WebsiteBaker Community Forum
General Community => Global WebsiteBaker 2.8.x discussion => Topic started by: Fitzi on May 22, 2008, 01:18:57 PM
-
Hello! I have following question:
How can I change my banner background-image (define in css), when I click a link to an other menue point.
CSS:
#BANNER {
width: 750px;
text-align: right;
margin-left: auto;
margin-right: auto;
height: 122px;
background-color: #FFFFFF;
background-repeat: no-repeat;
background-image: url(bg_back_1.jpg); --> When somebody go to MenueLink2 - change it to bg_back_2.jpg
}
-
You can create a 2nd template with bg_back_2.jpg and then assign this 2nd template to your menu2 page.
-
Doing this in CSS is almost imposible.
You could also set that css line from the index.php and use the PAGE_ID variable to create a filename.
Just make sure you have an image for all pages (or build some php that checks for file_exists).
I could think of more tricks like this.
i.e.: Use the keywords field to set the name from the backend (and don't use the dynamic keyword META tag).
or: select a different CSS on the PAGE_ID of the current page.
There are several examples on this forum.
Have a look at this: https://forum.WebsiteBaker.org/index.php/topic,9284.msg54875.html#msg54875 (https://forum.WebsiteBaker.org/index.php/topic,9284.msg54875.html#msg54875)
Ruud