Hi there,
i would like to have for each page a different picture in the header.... llike... home-->pic1 ; about us-->pic2, etc.
How can I do it with css?
could someone giv eme a help. Could you also give me some code or a web page to show me the result...
thx in advance for any help.
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.
I would just set an ID on your body tag and then use css to style specific pages.
So something like <body id="$URLSegment"> in your template, and then your css
#header{background:imageurl;} //default image
#segment1 #header {background:imageurl;}
#segment2 #header{background:imageurl;}
Then your html header should be <div id="#header">Stuff</div>
If you add new pages, you'd have to manually update your css stylesheet, or it'll give the default image.
You could also search the forum, I believe there was a method which allows you to upload and handle the images per page in the backend CMS. Depends on which way you wanna go.
Hi LeeUmm,
sorry but could you explain me better what I should do..sorry. I have no idea which file I should change and what I have to change to make it work, I'm not so confident with silverstripe and css...
Hope you can give me a help..
thx