Forums / Setup & design / Excluding a node from the left hand menu

Excluding a node from the left hand menu

Author Message

Andrew Wigglesworth

Sunday 05 December 2004 10:51:41 am

I've searched through the documentation and these forums for an answer to this, but so far have not found a solution that works.

I've used the section-exclude parameter, but this isn't working. The contents of the flat_left.tpl are below

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

<h3 class="hide">{"Left menu"|i18n("design/base")}</h3>

{let docs=treemenu( $module_result.path,
$module_result.node_id,
ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
0, 5 )
depth=1}
<ul>
{section var=menu loop=$:docs last-value}
{section-exclude match=eq($node_id, 332)}
{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( 25 )}</a>

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

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

Above I have used {section-exclude match=eq($node_id, 332)} , I've also tried
{section-exclude match=$:item.node_id|eq(332)} to no avail.

Anybody got any pointers?

(and, yes, the node number is correct)

Martin Ulrich

Sunday 05 December 2004 11:16:20 am

I'd like to know it too! (In meantime I solve that by putting the nodes which should not shown as subnodes under a class, which is not included. )

{let docs=treemenu( $module_result.path,
                    $module_result.node_id,
                    array( 1,31,32,33,35 ),
                    2, 2 )
                    depth=1}

but I am a kind of newbi, :-)

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Mark Marsiglio

Sunday 05 December 2004 8:50:40 pm

This one is not pretty either, but it works.

I used an "offset" to skip the first item in the list. My nodes are sorted in priority order, so I just make sure the item I want to skip (in my case it is just a non-public storage folder) is the first one in my sorted list.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

steve walker

Monday 06 December 2004 1:08:47 am

The excluding node code should work fine. Some working code I have in a treemenu from an old site is:

{* SECOND LEVEL *}
        {section show=$node_obj.path_array|contains($:item.node_id) loop=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1), sort_by, array(array(priority))))}
                {section-exclude match=$:item.node_id|eq(235)}				
				{section-exclude match=$:item.node_id|eq(214)}
				<li id="secondlevel"><img src={"design/news/images/maintemplate/secondlevel-arrow.gif"|ezroot} ALT="">&nbsp;<a href={concat("/content/view/full/",$:item.node_id,"/")|ezurl}>{$:item.name}</a></li>

Checking Andrews code, try something on the lines of:

section-exclude match=$menu.node_id|eq(332)}

and any other variants you can think of.

Steve.

http://www.oneworldmarket.co.uk

eZ debug

Timing: Jan 18 2025 02:11:03
Script start
Timing: Jan 18 2025 02:11:03
Module start 'content'
Timing: Jan 18 2025 02:11:05
Module end 'content'
Timing: Jan 18 2025 02:11:05
Script end

Main resources:

Total runtime1.5414 sec
Peak memory usage4,096.0000 KB
Database Queries201

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.9609180.8125
Module start 'content' 0.00751.3294 769.7734644.2344
Module end 'content' 1.33690.2045 1,414.0078337.3672
Script end 1.5413  1,751.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.2658210.0002
Check MTime0.00170.1075210.0001
Mysql Total
Database connection0.00090.057010.0009
Mysqli_queries1.459194.66472010.0073
Looping result0.00200.13061990.0000
Template Total1.508397.920.7542
Template load0.00200.128720.0010
Template processing1.506397.727220.7532
Template load and register function0.00010.007810.0001
states
state_id_array0.00120.076310.0012
state_identifier_array0.00310.200720.0015
Override
Cache load0.00170.1128650.0000
Sytem overhead
Fetch class attribute can translate value0.00120.077950.0002
Fetch class attribute name0.00100.061760.0002
XML
Image XML parsing0.00130.086150.0003
class_abstraction
Instantiating content class attribute0.00000.000760.0000
General
dbfile0.00320.2077320.0001
String conversion0.00000.000530.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs