kentico_radekm
-
9/23/2008 8:20:04 AM
RE:Different graphics on different section of a site
Hello,
I am not sure, if you can change master's page content in dependance of sub-page loaded into this master page, but there is one alternative solution using visual inheritance feature.
I will demonstrate it on example: I have a site, which using some master page. Then I have 2 sections: Audio and Video. Both includes some pages. Like here:
Root -Audio . Page 1 . Page 2 - Video . Page 1 . Page 2
Now I want e.g. Audio and Video section to have the same template but with different image in footer. I do it with following steps:
1. If Audio and Video section uses same template, i make its copy and use for Audio original and for video copied template. 2. I insert "<div class="zoneFooter"> <cc1:CMSWebPartZone ID="zoneFooter" runat="server" /> </div>" into layout of both templates used on Audio and Video sections. 3. Into this webpartzone i insert General/Powered by Kentico webpart and in its properties change Content->Text to different URL (path to picture you want to use). By this way i can ensure different image in page footer in two different sections of my web. 4. I go to Audio and Video page's Properties -> Template and select "Do not inherit any content"
Or you can change layout of master page to have only webpart you do not want to change in particular categories. And requested webparts, you want to change, add when editing layout of particular section.
To more info about visual inheritance please read: http://devnet.kentico.com/docs/devguide/visual_inheritance.htm
Best Regards, Radek Macalik
|