Cutline Theme Support Forums » Cutline Theme Support Forums

multiple sidebars for page templates?

(7 posts)
  • Started 4 years ago by nycdeb
  • Latest reply from magothy
  • This topic is resolved

  1. I've been using 3 column cutline for a while now (most currently at the soon to launch http://www.fabulousfoodie.com) and it's so flexible, that it's almost been more of a CMS than a theme for me. I'm really extraordinarily pleased with it. Anyway, here's my question today.

    As I start creating different page templates recently and I'd like to vary the content of the side bars per template type. I've figured out how to get a template to display one sidebar or the other but I can't figure out who to vary the contents of the sidebars themselves.

    So, for example, if 'home' and 'about' have l_sidebar (containing recent posts, categories, archives) and r_sidebar (containing blogroll, search, meta) can I have a left hand sidebar on a page template (let's call it 'recipe') that contains categories, blogroll and search without changing the l_sidebar on home and about?

    I'm starting the think that using widgets is what is holding me back. If there's a way to work this with widgets, that would be great. If I have to lose the widgets to get this done - well, I will give it my best shot if someone can get me started.

    Posted 4 years ago #
  2. nycdeb -
    This is listed as "resolved" but I'm not seeing any answers. I'm trying to do the same thing. Did you get a solution?

    Posted 4 years ago #
  3. Paul
    Member

    Hi nycdeb and kimbere,

    Would like same information (if you happen to find it somewhere else).

    Thanks,
    Paul

    Posted 4 years ago #
  4. jane42
    Member

    Me too -- please share if you find out how to do this! (can't think why this is marked as resolved).

    J

    Posted 4 years ago #
  5. hi all,

    I know it got marked resolved - and I was puzzled when it happened since it wasn't at that time resolved. I poked and prodded the coding as much as possible but I haven't been able to find an easy solution that didn't involve widgets.

    I'll try and explain though I admit in advance, I am crap at explaining things like this. I just poke at code until it does what I want and I'm not always sure why it works.

    The answer I've cobbled together so far involves using 3 sidebars (the ones that exist already: l_sidebar.php and r_sidebar.php and one I called sidebar3.php). To create, sidebar3, I just made a copy of the code for "right" (since I was planning on that one being the one that changed most) and I renamed it by including a call for Template Name: sidebar3 at the top. That way, the templates that are supposed to call that one, know which one to get.

    In functions.php, I changed the number of sidebars to 3 and lo! there appeared 3 sidebars on my widgets presentation page so I could mess with the contents of the various sidebars. I also grabbed the JAW Duplicate Widgets plugin to allow me to make multiple copies of specific widgets ('cause I needed two sidebars to include "Recent Posts" and stuff like that. It also allowed me to make quite a few "Text Box" widgets which I used for ads.

    So, having created the sidebars, I went about creating templates and making sure that the sidebar I want on the right (I've left the left one pretty consistent) is name of the sidebar after the TEMPLATEPATH include near the bottom of the page.

    I would have liked to have avoided all the widgeting but *shrug* - no other answer seemed to be forthcoming and I didn't know how to "unresolve" the thread since I wasn't sure how it got marked resolved in the first place.

    I've done my best to explain. I'm not sure I helped but I hope I did.

    Posted 4 years ago #
  6. nycdeb -
    This is great! One question. How do you assign a sidebar file to a sidebar widget? Cutline already knows that sidebar 1=l_sidebar.php and that sidebar 2=r_sidebar.php. How do I correlate the rest?

    Posted 4 years ago #
  7. Never mind -- I just found the 'dynamic_sidebar(1)' code in the sidebar files.

    Posted 4 years ago #

RSS feed for this topic

Reply

You must log in to post.