Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Show only "active" products

 

 


IronVictory
User

Jun 20, 2008, 10:02 AM

Post #1 of 2 (172 views)
Shortcut
Show only "active" products Can't Post

I have set up a checkbox called "Active" and I don't want to display any items that are not checked. I could put it in the URL like this:
viewer.php?category=tents&active=1, but I don't want to show the active=1 in the URL as users could easily change it to active=0 to see all the inactive items. If I remove it from the URL and use 'where' => 'active ="1"'; I believe it will override the category=tents as well. Is there a way to still use ?category=tents in the URL but "hide" the active variable?


Dave
Staff / Moderator


Jun 20, 2008, 11:15 AM

Post #2 of 2 (165 views)
Shortcut
Re: [IronVictory] Show only "active" products [In reply to] Can't Post

Hi IronVictory,

You're on the right track. The old viewer code worked like that - when you had a 'where' field it would ignore the search fields. The new viewer code doesn't. You can tell the difference by the style of code:

// old code style:
$options['where'] = 'active ="1"';

// new code style:
'where' => 'active ="1"',

Try adding the where as you suggested, it should do the job. Also, for a list and description of all the viewer options see this page: http://www.interactivetools.com/docs/cmsbuilder/viewer_options.html.

With the new system searching is always enabled unless you disable it with: allowSearch => false,

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4