Help with filtering code

6 posts by 3 authors in: Forums > CMS Builder
Last Post: December 4, 2013   (RSS)

Help with code

By Daryl - December 2, 2013

Hi dccreatives,

CMSB has a reserve field called "hidden" for hiding a record. You can just add a new checkbox field "Hidden" with a field name "hidden" and checked the records you don't want to show.

Hope this helps,

Cheers!

Daryl Maximo
PHP Programmer - interactivetools.com

Help with code

I do not want to hide the record, because you need to get to that record from another page/search. I just wanted to hide it from displaying on  a specific page.

Let me know if you have any ideas.

Help with code

ok, I got this, but I want to write the opposite

 <?php if ($record['hide_from_search_page']): ?> 

I want to write if it is not checked (as this is a checkbox).

This code after my foreach gives me what I want to hide. How do I write the opposite?

By Dave - December 3, 2013

Hi dcccreatives, 

Try this (new code in red): 

  'where' => "hide_from_search_page != '1' AND $where",

Let me know if that works for you.  Cheers!

Dave Edis - Senior Developer
interactivetools.com

Worked like a GEM!

Thanks for your help.