Welcome to the PageLines Forum. First check out the PageLines Docs to see if we have already answered your question. Before you post please read the forum guidelines.
Upcoming “PageLines Developer Essential Training”
Latest news regarding the developer training videos Click here!
Only three sidebars? I need more flexibility! Do you know how?
  • Hi,

    I am building a reasonable size site, www.icologie.com, and need to have more flexibility around sidebars. Here are some questions I have that might help with fix some of the current limitations i'm finding.

    1. Can I pass parameters to the page? There are a limited number of sidebars. I need them to react to the context of the page dependant on the content. ie show different information for "Training, Services, Events, support etc." Can I pass parameters to the page and then use these in the side bar

    2. Can I have more sidebars? Is there somewhere I can add more sidebars?

    All the best

    Andy
  • We could tell you how to add sidebars, but I'm wondering if the widget-logic plugin would get what you wanted a little easier.
  • Hi Adam,

    Thank you for responding. That little plug in looks good. I would be grateful if you tell me how to add more sidebars too ;-)

    Also do you know how to send parameters between pages? Is this possible?

    All the best

    Andy
  • Also do you know how to send parameters between pages? Is this possible?

    Not sure what you mean here? You talking about custom fields?

    Generally to add a sidebar you need to register a new one basically copying this markup in config_sidebars.php

    `
    register_sidebar(array(
    'name'=>'main_sidebar',
    'description' => __('An option for the main sidebar. Graphical style: solid white/grey widgets with rounded corners.', TDOMAIN),
    'before_widget' => '<div id="%1$s" class="%2$s widget"><div class="winner">',
    'after_widget' => ' </div></div>',
    'before_title' => '<h3 class="wtitle">',
    'after_title' => ' </h3>'
    ));
    `
    but using a new name and description. Then you would need to add it the appropriate option array in config_page_post, but I don't know how to instruct unless I know which theme you're using.
  • We would also like to be able to do this. We are using the Platformbase theme. I can't find where you guys register the sidebars...It's usually in the functions.php file from themes i've worked on before. Finding code I'm use to finding in certain places is proving rather difficult.

    If you can help me add a few more sidebars that work like the primary and secondary it would be much appreciated.

    Thanks.
  • Just wanted to add another voice to the chorus here -- would love some more information on how to do this with Platform Pro.

    We too are looking for the content-specific sidebars that can be controlled from the admin editor.
  • Good ideas, moved to Ideas and Feedback.

    Thanks, Bryan
  • So I am still wondering about a solution for this. I much rather just register a few more sidebars, (which IMO should be included with the theme since you do a great job of it with the primary and secondary ones), instead of downloading a plugin.

    cmunns do you have a solution?
  • I think for now this is a consideration for a future feature.

    I'm not sure of the developers can help to that extent.

    I should let you know http://www.pagelines.com/pros/ is coming soon.

    I'll forward to developer and see if they have any other input.

    Thanks, Bryan
  • I simply couldn't wait for a future feature so I found out how to do it on my own this morning.

    *For others who want to do this follow these instructions, but note that if you ever update the theme in the future you will most likely overwrite these changes and your site could be broken. Make sure you know what your doing when editing the platform pro theme core files.

    First: Navigate to Sections/Sidebars/ and open the section.sb_primary.php file. Save this as section.sb_third.php before doing anything.

    Second: On line 11 change PrimarySidebar to ThirdSidebar, this is the class. Everywhere else in this file where it says Primary change to Third. Pretty simple concept. SAVE the file again.

    Third: Upload this file to your server in Sections/Sidebars/

    Fourth: Navigate to Config/ and open up config.templates.php

    Fifth: In the section where you register sidebars, add another one simialr to this line: pagelines_register_section('ThirdSidebar', 'sidebars', 'sb_third');

    Sixth: Upload this file to your server as well.

    THAT's IT!!

    It took me forever to find out where this code was, but it's rather simple to add more sidebar widgets so you can have many different widgets on many different pages. We all want the customization that the Platform Pro theme offers, these instructions just free us up even more.

    Hope you find this useful.
  • Thank you very much for sharing, good karma :).

    Thanks, Bryan
  • After reading and understanding child themes more I found that there is an easier way to do this in the child base theme (if you're using it).

    Simply register a new sidebar widget or section in the functions.php file at the very bottom, they have an example of the BaseSidebar in there already....just copy that line and replace base with a new name:

    old: pagelines_register_section('BaseSidebar','sb_base', null, array('child' => true) );

    new: pagelines_register_section('ThirdSidebar','sb_Third', null, array('child' => true) );

    Then go into the sections folder in the base theme and open up file sections.sb_base.php and save it as new file. ie sections.sb_Third.php. Then replace the word base with Third in that document. Save again and upload to the server. You're done!

    Again, the main reason for using the child theme is the fact that you can update your core them with security fixes in the future without worrying about overwriting any files. It's what every business using Pagelines should do. It's safer and eliminates any possible headaches down the road.
    Thanked by 1amy_atwell
  • @Jeremy Thanks again for sharing!
    PageLines Moderator - Vibe Development
  • Will this work for universal and content sidebars as well? In PagelinesPro
  • Let me see if I can get some insight for you...

    Thanks, Bryan
  • @Robert, follow the format of the sample sidebar section in PlatformBase but reference the "content" and "universal" sidebars as well...specifically you need to change the default "works with" parameter which is different in the universal/content sidebars..

    You'll see it in there on the top of each section.
  • Thank you, I will give it a try.
  • That worked!

    I opened the "section.sb_universal.php" in platformpro to get the "works with" parameter. But, made all the changes in platformbase as per Jeremy's instructions.

    Thank again for the help!
  • Jeremy, I wanted to thank you for this. This is exactly what I needed. Very well explained and with step by step instructions where you don't have to piece things together when trying to figure things out.

    Again, thank you. I was so frustrated, but you gave me some hope in continuing to use Platform Pro.

    I'm hoping for more instructions from the PageLines staff on how to edit/create website with walkthroughs, videos etc.
  • Documentation is currently being revised. :)
  • How is this process executed in Pagelines 2.0? I have the Pagelines Customize plugin installed but am still having difficulties. I hoped it was as easy as adding new sections is but not exactly. Any ideas?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Weekly Karma