I need a little assistance on a list viewer query if possible

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 27, 2015   (RSS)

By Dave - April 27, 2015

Hi Kurt, 

You don't need to do this, CMSB does it automatically (also you're passing in user-input without escaping it so there's a security risk there):

'where' => "category = '$_GET[category]'",

Try just removing that line and still passing ?category=[your value] in the url.  It should work exactly the same not not filter on that when category isn't defined.  

That's what "allowSearch" does (and it's enabled by default unless you set it to false).

Here's some more info on that: http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

Give that a try and let me know any questions or problems.


Dave Edis - Senior Developer

By kkegans - April 27, 2015

Dave,  Thanks!!!

Leave it to me to try to make it difficult  ;-)

CMSB Rocks!