Hello,
I want to use a different header-image based on the url-segment of the page.
I've found some forumposts about this theme, but there it's up to the user to choose a headerimage in the backend. It's my aim to automate this.
So I've put this in my Page.ss
<div id="header">
<img src="$ThemeDir/images/PageLeerling/titelafbeeldingen_leerlingen/$URLSegment.png" alt="" name="achtergrond_header" id="achtergrond_header" />
</div>
I've prepared the different headerfiles according to the url segments.
But when I look in the sourcecode of the rendered page, I see this:
<div id="header">
<img src="/themes/guatemala/images/PageLeerling/titelafbeeldingen_leerlingen/" alt="" name="achtergrond_header" id="achtergrond_header" />
</div>
so apparantly $URLSegment isn't picked up.
Is it possible to achieve this whitout coding in the controller? Or, if so, what do I have to do?
Thanks.