Tuesday 16 November 2004 7:06:32 am
Welcome to eZ publish Brad! I think there could be an easier way to solve this issue. You could assign an ID to the body tag that is the name of the section. Then, instead of using an image tag, set up a div that matches your dimensions (562 x 200 pixels), and assign the background image for that section. This may be a bit confusing, so I'll try to provide some code, but please note, this is untested, so you may need to tweak it.
This example assumes three sections, named 'Products', 'Contacts' and 'Gallery'. <b>Generate ID for body tag</b>
{let thesection=fetch( 'section', 'object', hash( 'section_id', 1 ) )}
<body id="{$thesection.name}">
{/let}
<b>DIV</b>
<div id="SectionImage"></div>
<b>CSS</b>
body#Contacts div#SectionImage, body#Gallery div#SectionImage, body#Products div#SectionImage {
display: block;
height: 200px;
width: 562px;
}
body#Contacts div#SectionImage {
background-image: contacts.jpg;
}
body#Gallery div#SectionImage {
background-image: gallery.jpg;
}
body#Products div#SectionImage {
background-image: products.jpg;
}
Does this help?
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|