Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Yogini Idnani
Seperate header banners for different sections of the site
9. Mai 2013 16:36
Antwort

Yogini Idnani

Rang: New Member

Nachrichten: 3

Eintrittsdatum: 6. März 2013

Neue Beiträge

The site I am developing has major 3 sections. Every section has a few section-specific customizations like the header banner image (portal_normal.vm)

1<header id="banner" role="banner">
2<img alt="Section 1" src="$images_folder/section1_header.png" />
3</header>


Is there a way I can force every page on my website to be either part of Section1, Section2 or Section 3 and edit code in portal_normal.vm to display different banner images based on the section of the site.

It would mean a lot of code duplication to make 3 different themes for doing this.

Any help appreciated!
Thanks
Samuel Kong
RE: Seperate header banners for different sections of the site
9. Mai 2013 19:45
Antwort

Samuel Kong

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1032

Eintrittsdatum: 10. März 2008

Neue Beiträge

Here's what I would do.

1. Instead of using an <img> tag, use a CSS background image.
2. Create 3 color scheme, one for each section.
3. So all you would have to do is override the default the background image in the color scheme's CSS
Yogini Idnani
RE: Seperate header banners for different sections of the site
12. Mai 2013 15:19
Antwort

Yogini Idnani

Rang: New Member

Nachrichten: 3

Eintrittsdatum: 6. März 2013

Neue Beiträge

Hi Samuel

Should have made this more clear. Apart from the css banner image, there are a couple of code related changes for the different sections:
  • Show a different set of static links
  • Highlight a particular menu area


Both the above changes would need to be made in the vm files.
Anonym
RE: Seperate header banners for different sections of the site
12. Mai 2013 21:35
Antwort

Anonym

You could still do what samuel was saying, then in your vm files have it detect which color scheme is selected and then do the vm stuff that you needed to do.