Flag to see if search was triggered

4 posts by 2 authors in: Forums > CMS Builder
Last Post: June 24, 2013   (RSS)

By Jason - June 20, 2013

Hi,

There isn't a function that will detect if a search was triggered or not.  allowSearch only comes into play when there are variables in the $_REQUEST array that match fields in the section.  One way you can try to detect this is to go through each element of the request array and look for names that match fields.  This can get complicated when you are using multiple fields in a name (ex "title,content_keyword").  If you can let me know how you would need to use this, there may be other options.

Hope this helps,

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Thanks Jason. I suspected as much. 

If the .num at the end of the URL is part of the $_REQUEST array, is there a standard index for that value? If there is then I could easily check that. Suspect that this is not the case though.

Cheers,

J.

By Jason - June 24, 2013

Hi,

The easiest way to check for the existence of a number in the url is to use getLastNumberInUrl();  This is going to be easiest that checking the $_REQUEST array.

Hope this helps,

Jason

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/