Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So late, but I hope can help to somebody...</p> <p>Do you need look into your cssHorizontalMenu.vm, it does the work of generation of the HTML output. If do you have a .vm </p> <p>Maybe you have something like this:</p> <pre><code>#macro( displayCssMenu $menu ) #if ($displayer.isAllowed($menu)) #set ($count = $count + 1) ## set menu title #set ($title = $displayer.getMessage($menu.title)) #if (!$menu.url) #set ($url="javascript:void(0)") #else #set ($url=$menu.url) #end ## create a single menu item #set ($itemClass = "") #if (!$menu.parent) #set ($itemClass = "mainItem") #end #set ($img = "") #if ($menu.image) #set ($img = "&lt;img alt='$menu.image' class='icon setImageMenu $menu.image'/&gt;") #end #if ($menu.components.size() == 0) #if ($count == $renderedChildren) &lt;li class="last"&gt; #else &lt;li&gt; #end #if ($menu.name == $currentMenu) &lt;a href="$url" title="$title" class="current $itemClass" #if($menu.target)target="$menu.target" #end#if($menu.width)style="width: ${menu.width}px"#end&gt;$img ${title}&lt;/a&gt; #else &lt;a href="$url" title="$title" class="$itemClass" #if($menu.target)target="$menu.target" #end#if($menu.width)style="width: ${menu.width}px"#end&gt;$img ${title}&lt;/a&gt; #end #else ## create multiple menu items in a menu #if ($menu.components.size() &gt; 0) #set ($hasViewableChildren = false) #set ($renderedChildren = 0) #foreach ($menuIt in $menu.components) #if ($displayer.isAllowed($menuIt)) #set($hasViewableChildren = true) #set($renderedChildren = $renderedChildren + 1) #end #end #end &lt;li#if ($hasViewableChildren) class="menubar"#end&gt; &lt;a href="$url" title="$title" #if ($menu.name == $currentMenu) class="current $itemClass" #else class="$itemClass" #end#if($menu.target)target="$menu.target" #end#if($menu.width)style="width: ${menu.width}px"#end&gt;$img ${title}&lt;/a&gt; #end #if ($menu.components.size() &gt; 0) #if ($hasViewableChildren) &lt;ul&gt; #end #set ($count = 0) #foreach ($menuIt in $menu.components) #displayCssMenu($menuIt) #end #if ($hasViewableChildren &amp;&amp; ($count == $renderedChildren)) &lt;/li&gt; #else &lt;/ul&gt; #if ($count &gt; $renderedChildren) &lt;/li&gt; #end #end #else &lt;/li&gt; #if ($count == $menu.parent.components.size()) &lt;/ul&gt; #end #end #end #end #displayCssMenu($menu) </code></pre> <p>then you can try to do this... (look for the <strong>#if ($menu.parent)</strong>)</p> <pre><code>#if ($menu.components.size() == 0 &amp;&amp; $menu.parent) #if ($count == $renderedChildren) &lt;li class="last"&gt; #else &lt;li&gt; #end bla.. bla... bla.. bla... #end #if ($menu.components.size() &gt; 0) #if ($hasViewableChildren) &lt;ul&gt; #end bla.. bla... #else #if ($menu.parent) &lt;/li&gt; #end #if ($count == $menu.parent.components.size()) &lt;/ul&gt; #end #end </code></pre> <p>this prevent to print the LI A elements for the parent menu, and only prints the items elements...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload