Saturday 26 February 2005 12:53:50 pm
Setup->Classes
Edit your folder class and add checkbox called "Show in menu" (show_in_menu) By default checkbox is checked. Then replace code in design/base/templates/menu/double_top.tpl If you using double top menu
{section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
<li class="last {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{section-else}
<li {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{/section}
with
{section show=$menu.object.data_map.show_in_menu.data_int}
{section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
<li class="last {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{section-else}
<li {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{/section}
{/section}
If you usign design/base/templates/menu/flat_top menu replace
{section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
<li class="last {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{section-else}
<li {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{/section}
With
{section show=$menu.object.data_map.show_in_menu.data_int}
{section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
<li class="last {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{section-else}
<li {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
{/section}
{/section}
If show_in_menu flag is set to true (checked) item is show in menu.
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|