Hide or show sidebar based on category?

Creating and modifying plugins.
Post Reply
killbam
Regular
Posts: 8
Joined: Tue Dec 26, 2006 8:13 am

Hide or show sidebar based on category?

Post 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
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
killbam
Regular
Posts: 8
Joined: Tue Dec 26, 2006 8:13 am

Post by killbam »

Beautiful, I will try it out. Thank you very much, and good luck on working on that plugin =D
Post Reply