Tags/categories filter

4 posts by 2 authors in: Forums > CMS Builder
Last Post: November 30, 2010   (RSS)

By zip222 - November 29, 2010 - edited: November 30, 2010

I have a page where I am using this statement...

'where' => 'category=1',

but this only shows me articles that only have the '1' category (sports) checked. if another category is checked the article doesn't show up. is there a way to modify that statement to show all articles that has that category selected?

Re: [zip222] Tags/categories filter

By Jason - November 30, 2010

Hi,

What type of field is category? Is it a multi-select list?

If so, you could try this:

'where' => "category LIKE '%\t1\t%'",

Is this more what you're looking for? If you're still having a problem, please provide some more details about the field and what you're trying to do.

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/

Re: [Jason] Tags/categories filter

By zip222 - November 30, 2010

Yes, the field type is a multi-select. What you suggested worked perfectly. thanks.