Flag to see if search was triggered

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

By In-House-Logic - June 20, 2013

Hi there,

Let's say you have a normal query where 'allowSearch' is true.

Is there any flag we can check to see if that search was actually triggered? i.e.: the user winds up on a page with a URL of : http://somesite.com/catalogue.php?-3 where the '3' is pulling from the product table where record.categroy = 3. 

Is there a native CMSB  variable such as "searchTriggered = TRUE" that we can check?

Thanks,

J.

By In-House-Logic - June 20, 2013

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/