General approach of adding a sidebar into an existing skin?

FarikoBrainiac
FarikoBrainiac
@farikobrainiac
8 years ago
3 posts
hey there, what would be best practice to add a sidebar that would appear on certain (or all) site pages within one domain?


1. create a template file (sidebar.tpl) with the required recurring content
2. load sidbear.tpl in the index.tpl at the right place? (using divs and formatting to position it at right side of the page)

would it also be possible to pick up the sidebar.tpl in a widget on a page made with the sitebuilder?
updated by @farikobrainiac: 06/21/16 09:48:30AM
paul
@paul
8 years ago
4,326 posts
There are various options. With SiteBuilder, create a column for the sidebar on the pages that require it, then create the widget(s) to go in it. Unfortunately there is no 'copy/paste' for widgets so they would need to be created for every page sidebar, but hopefully, with SB that is not too big a job.

To automatically place a sidebar on every page, build it in either the header.tpl template (for the left hand side) or the footer.tpl (for the right hand side). Use the column divs (class="colx") to define the width of the main content and the sidebar. Alternatively, create a template called side.tpl (say) then in the main template, set up the column widths as above (remember that total column widths must equal 12) then include the side.tpl template in them.
Take a look at some of the existing templates to see how to do this, jrSage/index.tpl for instance.
hth


--
Paul Asher - JR Developer and System Import Specialist

Tags