How to show a specific include, depending on current section?

How to show a specific include, depending on current section?

Friday 13 February 2004 3:50:41 am - 2 replies

Author Message

Tore Skobba

Friday 13 February 2004 4:05:26 am

Hi

You could check on the $node being viewed with {$node.object.section_id}, i.e.
{section show=$node.object.section_id|eq(1)}
Load section 1 page
{/section]

Note: the eq syntax might be wrong. Alternatively if you are not in the node template then use {$module_result.section_id} to get the current section.

Tips {$node|attribute(show)} lists all available attributes for $node, where $node can be any variable.

Tore

Maarten Holland

Wednesday 18 February 2004 12:14:40 am

Unfortunately I can't get it to work. If I'm not mistaken, I can't use 'node' when caching is disabled. Is that correct? I've disabled all my caches and try to use the following code:

{section show=$module_result.section_id}|eq(4)}
{include uri="design/support/override/templates/page_4.tpl"}
{/section}

4 Is the number of my section. Can anyone please tell me what I'm doing wrong?

Thank you very much for any help!

Maarten

You must be logged in to post messages in this topic!

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