{{indexmenu_n>10}}
====== View submenu conditionally ======
> I put together a combined horizontal and vertical navigation, the vertical (sub) menu will be displayed only when actually sub-menu items are available //(this is for example the case on the product pages, but not at home)//.
\\
----
Forum: [[http://forum.phpwcms.org/viewtopic.php?p=90950#p90950|Untermenü nur bedingt anzeigen]] \\
Autor: Oliver Georgi 2007/08/26
----
\\
You can not automate everything within a CMS!
Some menu solution can be implemented only by custom logic.
But it's important - if possible do **NOT** use inline PHP. In your case it goes as follows:
In the template, add to the area where the vertical menu is to appear
[**Note:** All the "numbers" are levels of structure IDs]
Create a new file **navi_left_right.php** in **%%template/inc_script/frontend_render/..%%** and fill in the following code:
{VERTMENU}
' . $_vertmenu . '';
} else {
$_vertmenu = '';
}
}
$content['all'] = str_replace( '{VERTMENU}', $_vertmenu, $content['all'] );
?>
\\
Use **{VERTMENU}** on the site in the template where you want to appear the result....
\\