Page 1 of 1

Hide or show sidebar based on category?

Posted: Fri May 23, 2008 3:49 pm
by killbam
Hi everyone,
I was wondering if there is a way to hide or show a sidebar, or a sidebar item, based on the category selected? On my main page I show one category, and then on another page, I show an entirely different category, and I would like that page to have it's own side bar.

Any help would be appreciated.

Thanks

Posted: Fri May 23, 2008 4:38 pm
by judebert
The "Toggle Sidebar State" (serendipity_event_sidebarhider) event plugin will do this job.

It's a little primitive (and by saying so, I've just volunteered myself to fix it, I can just feel it), and its name is misleading. After you install it, you get a new "Manage Sidebar Visibility" item in your Admin page. You can set sidebar items to be hidden based on the user or category.

It doesn't work correctly with items in multiple categories, even if the special category is the first one listed.

But, if your entries go in a single category, it can completely remove sidebar items when other categories are displayed.

Posted: Fri May 23, 2008 6:15 pm
by killbam
Beautiful, I will try it out. Thank you very much, and good luck on working on that plugin =D