Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Different sidebar for each page

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1845 Views
  • Colt
    Community Member
    3 Posts

    Different sidebar for each page Link to this post

    Hi Everyone,

    I am developing a site which has many different products. What I would like to do is add a sidebar to the right hand side of the page, and in this sidebar display a list of the "best sellers" so to speak.

    This said it would be greatly appreciated if I could get help with the following:

    1. how to add a sidebar on the right hand side of the page.
    2. have the content of the sidebar change when a different product/page is selected.

    Thanks for your help.

  • Bruce B
    Community Member
    145 Posts

    Re: Different sidebar for each page Link to this post

    Adding the sidebar is a CSS/HTML issue rather than a CMS one. There are lots of sites offering help on how to set up the design you want. You can then drop your SS code into it.

    The content is something else - that should, ideally, be automatically extracted from the context. Are they arbitrary links or do they refer to children or siblings of the page?


  • Willr
    Forum Moderator
    5511 Posts

    Re: Different sidebar for each page Link to this post

    Pretty simple really! Add a Text field to the Page in the CMS - Look at tutorial 2 on how to add fields to the cms. then like bruce said, its only a matter CSS / Design to position the sidebar somewhere. If your using Blackcandy I can send through some ideas for adding a right hand column

  • RobertM
    Community Member
    26 Posts

    Re: Different sidebar for each page Link to this post

    I'd be interested to know if it is possible to have differently structured HTML according to page type for a sidebar. For instance in the same way as using the layout folder, I tried to create another folder and use $FolderName like $Layout, but that didn't seem to work.

    Any suggestions?

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.