Forums / Setup & design / custom left menu

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

custom left menu

Author Message

Kevin Myles

Sunday 01 August 2004 10:29:34 am

I have created a custom left menu so it displays the subfolders of a particular node (109).
It looks great except when you select the a subfolder, subsubfolder, or an article of 109, when it displays everything fine, but also displays the subfolders of node 109 under the first subfolder like so:

sub a
-sub a
-sub b
-sub c
sub b
sub c
sub d

A moderator via email suggested I compare the current $menu.node_id against the currently displayed node ($DesignKeys:used.node) and its parent node ($DesignKeys:used.parent_node). (see below) But unfortunately, this hasn't worked.

below is the code. Please take some pity and help!
Thanks.


{let docs=treemenu( $module_result.path,
                    109,
                    array( 'folder' ), 1, 5 )
                    depth=1}
<b>::Issues of Concern::</b>         <ul>
     
        {section var=menu loop=$:docs last-value}
       {section show=ne( array( $DesignKeys:used.node, $DesignKeys:used.parent_node ),contains( 109 ) )}
            {section show=and( $menu.last.level|eq( $menu.level ), $menu.number|gt( 1 ) )}
                </li>
            {section-else}
            {section show=and( $menu.last.level|gt( $menu.level ), $menu.number|gt( 1 ) )}
                </li>
                    {"</ul>
                </li>"|repeat(sub( $menu.last.level, $menu.level ))}
            {/section}
            {/section}

            {section show=and( $menu.last.level|lt( $menu.level ), $menu.number|gt( 1 ) )}
                <ul>
                    <li class="menu-level-{$menu.level}">
            {section-else}
                <li class="menu-level-{$menu.level}">
            {/section}

  <a {$menu.is_selected|choose( '', 'class="selected"' )} href={$menu.url_alias|ezurl}>{$menu.text|shorten( 35 )}</a>

            {set depth=$menu.level}
        {/section}
           </li>

        {section show=sub( $depth, 1 )|gt( 0 ) loop=sub( $depth, 1 )}
            </ul>
        </li>
        {/section}
      {/section}
        </ul>

{/let}

Kevin Myles

Monday 02 August 2004 1:24:55 pm

I would appreciate some help as this is my last hurdle to going live.
Cheers,
Kevin.