Monday 24 November 2008 4:28:19 am
What about including a custom template just after the flat_left include :
{include uri="design:menu/left_menu.tpl"}
{if $some_reason}
{include uri="design:menu/push_frontpagecontent.tpl"}
{/if}
In the new template, you'll be able to use the $module_result variable. Maybe you could fetch the current node by using
{def $current_node = fetch( 'content', 'node', hash( 'node_id', $module_result.node_id ))}
....
....
Actually, you should fetch the $current_node at the top of your pagelayout... Then you'll be able to check anything you want. For exemple $some_reason could be equal to $current_node.class_identifier|eq('frontpage') (ie: you include the push_frontpagecontent.tpl only when you are displaying a frontpage object.
Another thing. When you use the $module_result variable, keep in mind that all the attribute are not always set. For exemple, *.node_id is only defined when the content module is used. What I often defined at the beginning of my pagelayout is :
{def $current_node_id = first_set( $module_result.node_id, 0 )
$current_node = cond( $current_node_id|ne(0), fetch( 'content', 'node', hash( 'node_id', $current_node_id )), false )}
Then, you'll have to put some cache-block with the good keys, etc... Hope this helps
Looking for information about SQLI ?
Looking for a new job in Paris ?
Please contact me at alafon [at] sqli [dot] com
|