Forums / Setup & design / Custom Left Menu--Fetch Subfolders of Specific Folders

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).

eZ debug

Timing: Jan 19 2025 20:01:44
Script start
Timing: Jan 19 2025 20:01:44
Module start 'content'
Timing: Jan 19 2025 20:01:45
Module end 'content'
Timing: Jan 19 2025 20:01:45
Script end

Main resources:

Total runtime1.2509 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.1953180.8125
Module start 'content' 0.00621.0469 770.0078567.6875
Module end 'content' 1.05320.1977 1,337.6953337.3516
Script end 1.2508  1,675.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3442210.0002
Check MTime0.00150.1227210.0001
Mysql Total
Database connection0.00060.046710.0006
Mysqli_queries1.155092.33082000.0058
Looping result0.00240.19381980.0000
Template Total1.219597.520.6097
Template load0.00210.167620.0010
Template processing1.217397.314620.6087
Template load and register function0.00020.019610.0002
states
state_id_array0.00090.073610.0009
state_identifier_array0.00110.088420.0006
Override
Cache load0.00180.1414310.0001
Sytem overhead
Fetch class attribute can translate value0.00160.129930.0005
Fetch class attribute name0.00140.114360.0002
XML
Image XML parsing0.00090.073030.0003
class_abstraction
Instantiating content class attribute0.00000.000960.0000
General
dbfile0.01691.3493270.0006
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs