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!
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?
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.
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.
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.
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:
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.
@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.
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.
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.
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?