Forums >
Help With Design and Skins
> Change header picture based on menu option
Change header picture based on menu option
Change header picture based on menu option
Can the header picture be changed based on the menu option click?
|
Re: Change header picture based on menu option
You could enable the use of different skins on different pages from site settings, then you could use different skins on different pages and have different images in the header of each skin.
else you would have to code something up in javascript to detect the url and change images by javscript based on the url, then you could do it using just one skin.
Hope it helps,
Joe
|
Re: Change header picture based on menu option
Hi,
I think Joe may have forgotten that he added a very cool feature in 2.3.6.4 which allows you to set a CSS class on the BODY element of a page using the "Page Settings." For instance, If you had a div with a class of header in your layout.master, you could set the CSS Class on a page to header2 and then in your CSS put the following:
body.header2 div.header {background: url('imagename.png') no-repeat 0 0;}
Of course, there will be other CSS rules that will apply to your div but this method will allow you to easily change the header on any CMS pages.
Also, for this to work, the BODY element in your layout.master must look like this:
<body class="pagebody" id="Body" runat="server">
HTH,
Joe D.
|
Re: Change header picture based on menu option
That's a brilliant solution Joe! I should have thought of that, the new custom class on the body makes a lot of things much easier.
Best,
Joe
|