Sections in Sections Issue

Author Message

Arran Price

Sunday 16 January 2005 12:28:44 pm

Hi all,
I have a site with 7 major sections, which are the top 7 nodes off the root node. I also have a large number (say 30) other sections. I need to change the look of the site based on which of the major sections the user is in.
Ive set up appropriate overrides to do this and it works fine, until the user goes into one of the other sections as the override now dosent match.

I figure I can potentially solve this in one of the following ways:
- Create an override for each section - the downside of this is the management overhead, its a lot of work and its going to get messy very quickly.
- Use an override syntax that caters for this (Is there one?)
- The changes in the look could be controlled by a single template with code to determine which "section" the user is in without using section functionality. ie some way of determining which node off the root node the user is in (Im not sure how to do this over multiple levels of hierachy). I think this is probably the best way of achieving what I want but could use some assistance with the code.

Is there a better way of doing this?

Any help greatly appreciated.

cheers

Arran

Kristian Hole

Monday 17 January 2005 11:53:28 am

In the pagelayout there is a number of variables set:

http://ez.no/ez_publish/documentation/customization/custom_design/template_variables_set_by_ezpublish

Some of this info can be used for your use (path.1.node_id?)

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Arran Price

Tuesday 18 January 2005 12:13:50 pm

thanks Kristian,

$module_result.path[1].node_id

did the trick (and was alot easier than I thought it was going to be).

cheers

Arran

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.