Forums / Setup & design / 1 layout for overriding several sections

1 layout for overriding several sections

Author Message

Tore Skobba

Tuesday 04 November 2003 10:03:26 am

Hi all

I have a need for a pagelayout to override severeal sections..

My site is organized as follows:

News (section 1)
News A (section 2)
News B (section 3)

Where news A and B are only available for certain users. However, all News are to have a similar layout being distinctive different from the rest of the site. Therefore I made a new section (section 4) and a layout for it. My plan was that all news sections should use that layout.

Example of override file:

[pagelayout_section_4]
Source=pagelayout.tpl
MatchFile=pagelayout_section_4.tpl
Subdir=templates
Match[section]=2
Match[section]=3

However, this does not work. Only section 3 is using the new layout.

Anyone have any tips on this?

Cheers
Tore

Alex Jones

Tuesday 04 November 2003 10:28:43 am

You need to break out the sections into separate overrides like so:

[pagelayout_section_2]
Source=pagelayout.tpl
MatchFile=pagelayout_section_4.tpl
Subdir=templates
Match[section]=2

[pagelayout_section_3]
Source=pagelayout.tpl
MatchFile=pagelayout_section_4.tpl
Subdir=templates
Match[section]=3

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>