Page 1 of 1

CompanyDirectory module - Regex in parameter name=

Posted: Tue Feb 21, 2017 12:23 am
by chips
Hi. I'm running CMS Made Simple 2.1.6. PHP version is 5.5.38 I am running CompanyDirectory module v1.23.3 / CGExtension v1.53.17 / CGSimpleSmarty v2.1.6 / CGSmartImage v1.21.5 / JQueryTools v1.3.9

I am trying to make use of the CompanyDirectory optional parameter name="" as discussed in the module help:

(optional) name="" - Applicable only to the default (summary) action. this parameter allows filtering companies by their name. Wildcard characters are allowed. i.e: name="a*". Additionally, regular expressions can be specified by prefixing the value with ::. i.e: name="::[0-9].*"

I am able to make name="a*" work but I am unable to make use of regular expression such as name="::[a-b].*" to signify company names starting with "a" or "b".

Could you point me to the right direction as to how the regular expression is used in this parameter. Thanks very much.

Re: CompanyDirectory module - Regex in parameter name=

Posted: Thu Feb 23, 2017 10:24 pm
by Rolf
There is a new release available in the Forge
http://dev.cmsmadesimple.org/project/files/250

Re: CompanyDirectory module - Regex in parameter name=

Posted: Fri Feb 24, 2017 12:24 am
by chips
Hi Rolf. Thanks very much for the regex filter bug fix in the most recent release.

Some questions from a newbie, though, before I could test it. My CMS module manager admin panel is still showing version 1.23.3 and not the new version 1.23.4 How do I upgrade the CompanyDirectory module without affecting the data that is already in the module? I have already exported the data to csv just in case something goes wrong. I do not know if that is enough. Thanks for any input.

Re: CompanyDirectory module - Regex in parameter name=

Posted: Fri Feb 24, 2017 9:01 am
by Rolf
It takes a while for the new release appears in the module manager, max. 24 hours.
You can download the XML from the Forge with right mouse click, save as...

Re: CompanyDirectory module - Regex in parameter name=

Posted: Sun Feb 26, 2017 2:57 am
by chips
Your bug fix was just great .... was able to make it work with

Code: Select all

{CompanyDirectory action="default" sortby="company_name" sortorder="asc" summarytemplate="mytemplate" name="::^[b-d].*"} 
to be able to display all company names starting with letter b,c or d.

Hats off to you .... how do i mark this as solved?

Re: CompanyDirectory module - Regex in parameter name=

Posted: Sun Feb 26, 2017 2:55 pm
by Rolf
I didn't fix it, Calguy1000 did! I am just the messenger ;)

You can a accept a post as best answer (green check), the thread will be marked solved.