Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Sidebar question


Go to End


2 Posts   1119 Views

Avatar
Hugo

Community Member, 3 Posts

19 April 2010 at 4:35am

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

Avatar
Hugo

Community Member, 3 Posts

21 April 2010 at 3:37am

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!