Copy link to clipboard
Copied
Hi!
I would like to display different content in the sidebar of a 2 column page template.
I would like to create one template to use for a group of pages. Depending on the page name, I would like to display the pages specific content in the sidebar.
I figured I would need to use conditional statements but I don’t know how to go about writing this.
The different sidebar content would be placed in content holders.
Please help me in figuring this out.

Much appreciated.
Marian
Easy with liquid conditionals, but probably easier with just named pages and content holders. Here's one solution:
Create your sidebar contentholders with names like "Sidebar-About", "Sidebar-Home", etc. The part after the "-" needs to be the page name where the content will appear.
In your template, insert this where the sidebar contents will go:
{module_contentholder,name="Sidebar-{module_pagename}"}
Copy link to clipboard
Copied
Easy with liquid conditionals, but probably easier with just named pages and content holders. Here's one solution:
Create your sidebar contentholders with names like "Sidebar-About", "Sidebar-Home", etc. The part after the "-" needs to be the page name where the content will appear.
In your template, insert this where the sidebar contents will go:
{module_contentholder,name="Sidebar-{module_pagename}"}
Copy link to clipboard
Copied
Thank you!
Yes, easy enough. I thought I tried this once before but was not successful. I can assume then, I was doing something wrong.
Thanks again FriscoTX. You saved me a lot of time.
Copy link to clipboard
Copied
Does your plan have access to web apps? Can be similar but more powerful using that.
The actual page is the web app item, you can build a menu of the web app items, you can have a sidebar of content, feature image and more through the web app.
Copy link to clipboard
Copied
I would like to try this approach. I've been working with BC for over a year now and I would like to do so much more than the normal things.Yes, my plan has everything.
Learning BC the hard way I created many templates for pages that needed different types of content in the sidebars.
I would like to use only a few templates and advance more on using web apps as you suggested.
Thanks so much!!