Jump to:

22993 Posts in 11829 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » Sidebar question

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 639 Views
  • Hugo
    Avatar
    Community Member
    3 Posts

    Sidebar question Link to this post

    This is the first time that im realy getting to grips with SS and i am liking it very much, my question is....

    Im building a 2 column site that requires just one page.ss template with a left-hand sidebar, pretty simple after following this tutorial by Aram on SSbits http://www.ssbits.com/create-a-static-sidebar/ i have modified the sidebar to my needs but i need it to hold different content for different pages Arams tutorial points to creating a

    "function that has the database call DataObject::get("StaticSidebar", "Type = $Side"), where $Side is the variable passed into the function (in this case "right")."

    im not wanting to use left or right sides just different content for each page using the same template file (page.ss) any pointers as to how i can achieve this, thanks

  • Hugo
    Avatar
    Community Member
    3 Posts

    Re: Sidebar question Link to this post

    Scrap the above, i was looking too deeply into things and was trying to adapt something else to do something else, the easy way would have been to read the tutorials,, (which i have now done)

    FWIW, i created a new content editor on page.php to edit the sidebar on a page to page basis.. Bloomin easier than what i was trying to do...

    Im loving this system, book order is on its way!

    639 Views
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.