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.

Template Questions /

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

Place image in sidebar


Go to End


1183 Views

Avatar
jseth

Community Member, 98 Posts

17 March 2010 at 8:09am

I've been searching for this topic and have found some answers, but not quite what I need. I have 16 pages out of all the pages in my site in which I need to place an image (a different one for each of the 16 pages) in the sidebar area. I have already created a pgmpage page type for these pages to differentiate them from the regular pages. I've tried creating a "sidebar" page and typing "<div id="Sidebar" class="typography">$Page(SidebarPage).Content</div> in my Page.ss code and it works, but it places the same image in every page. Close, but not really. I seem to not know enough about the coding to make the sidebar only appear on certain pages, then assign different images to each sidebar on each page. Would someone know how to do this? Thanks.