Abusing MenuManger for layout
Posted: Thu Oct 12, 2006 10:17 am
While working on the WFD-Website (see forum for more details) we wanted to create a changing header-image based on CSS without having different templates for each category. So what we did is use the MenuManger and define a new template which we called "getSection" and which uses the following code:
Then we called it inside each template (we have three templates) by using the following code:
But now we have a slight problem with a different project where we have hidden some navigation-items (don't show in navigation set in page-settings) but where we need a different header-graphic when the page is loaded. What happens now is that we get
because the page is not a menu-element. Any other ideas how to manage this? Might be useful for sitemaps as well where I see the same problem.
Regards,
Nils
Code: Select all
{foreach from=$nodelist item=node}
{if $node->current == true}{$node->hierarchy|truncate:1:""}{/if}
{/foreach}
Code: Select all
<div id="header" class="style0{cms_module module='menumanager' template='getSection'}">
Code: Select all
<div id="header" class="style0">
Regards,
Nils