Custom Left Menu--Fetch Subfolders of Specific Folders

Author Message

Kevin Myles

Thursday 08 July 2004 10:27:16 am

I want to have my left menu display the subfolders of a specific folders.

I made the following modification to the /menu/flat_left.tpl,

<div id="leftmenu">
<div id="leftmenu-design">

<h3 class="hide">{"Left menu"|i18n("design/base")}</h3>
<div class="unnamed1">
<form action={"/content/search/"|ezurl} method="get"> 
<table><table width="100%">
    <td height="16" td width="60"><b>{"Search UHRP.org"|i18n("design/standard/content/search")}</b>
            <input class="fullbox" type="text" size="9" name="SearchText2" id="SearchText" value="{$search_text|wash}" />
      <input class="button" name="SearchButton" type="submit" value="{'>'|i18n('design/standard/layout')}" />
      </div></td>
  </tr></table></class>
</div>
<br>

{let docs=treemenu( $module_result.path,
                    109,
                    array( 'folder' ), 0, 5 )
                    depth=1}
<b>::Issues of Concern::</b>         <ul>
     
        {section var=menu loop=$:docs last-value}
            {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(50)}</a>

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

Alex Jones

Thursday 08 July 2004 10:52:43 am

Kevin, what is the problem that you need help with? IS this code not working? If not, what is/is not happening when you view the page?

Alex
bald_technologist on the IRC channel: #eZpublish
http://www.agrussell.com :: http://www.cuttingedge.com

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Kevin Myles

Thursday 08 July 2004 12:14:39 pm

weird, for some reason the rest of my post wasn't posted.

anyway, I want the left menu to show the subfolders of a specific folder with the node id of 109...so above is the code i used,

but instead, it displays the top/main folder (node 2), with node 109's sub tree.

Yet, if you run a search, the results page are what i want. This is very confusing. Any help would be appreciated.
Cheers!
Kevin.

Kevin Myles

Sunday 11 July 2004 4:11:22 pm

so a few days later and i'm still stuck. i should note that i modified the menu.ini file to add a menu option (left + double top) so I'm using the flat left menu instead of the sub_left menu. I've been trying to solve this for a while, even trying to integrate the code from the top menu, but it doesn't seem to work. any suggestions as to how to get this to work properly would be really appreciated.....

the original code is this:

 
{let docs=treemenu( $module_result.path,
                    $module_result.node_id,
                    array( 'folder' ), 0, 5 )
                    depth=1}

obviously replacing

$module_result.node_id

, is wrong....how do i change the value of the root folder?

thanks for help

Kevin Myles

Friday 16 July 2004 7:20:58 am

with some help from a moderator, i discovered that this is the proper code:

 {let docs=treemenu( $module_result.path,
                    109,
                    array( 'folder' ), 1, 5 )
                    depth=1} 

changing the '0' to a '1' between the array and the list number (5).

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.