howto show toolbar only in parent node

Author Message

Greg Rundlett

Wednesday 09 March 2005 8:30:28 pm

I have a shop setup running 3.5, and without any customization. I would like to show the toolbar for "Latest Products" in the right side, but only for the main 'Products' page, and not the sub-pages. I can see the code for this toolbar in the base/templates/pagelayout.tpl


        {section show=ezini( 'Toolbar_right', 'Tool', 'toolbar.ini' )|count}
            <div id="rightmenu">
                <div id="rightmenu-design">
                    <h3 class="hide">Right menu</h3>
                    <div id="toolbar-right">
                        <div class="toolbar-design">
                            {tool_bar name=right view=full}
                        </div>{* id="toolbar-design" *}
                    </div>{* id="toolbar-right" *}
                </div>{* id="rightmenu-design" *}
            </div>{* id="rightmenu" *}
        {/section}

and I can see the toolbar management area within the administrative tool which allows me to show this toolbar for a given node and its children.

I also found the settings/siteaccess/shop/toolbar.ini.append.php script that defines the toolbars for this siteaccess:

[Tool_right_node_list_1]
parent_node=59
title=Latest products
show_subtree=products
limit=6

Is there a way / how do I show the toolbar only for the 'parent' node and not it's children?

Thanks

nothing to sig here, move along

Eivind Marienborg

Thursday 10 March 2005 12:12:40 am

A possible approach is to add a switch in the template matching the node of the Products page (assuming you only want to show this toolbar on -one- page). Alternatively you could try setting up the Product page in its own section, and make the switch match on sections.

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

eZ debug

Timing: Jan 18 2025 22:36:31
Script start
Timing: Jan 18 2025 22:36:31
Module start 'layout'
Timing: Jan 18 2025 22:36:31
Module start 'content'
Timing: Jan 18 2025 22:36:32
Module end 'content'
Timing: Jan 18 2025 22:36:32
Script end

Main resources:

Total runtime0.9303 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0110 588.0313152.6406
Module start 'layout' 0.01100.0048 740.671939.4766
Module start 'content' 0.01580.9131 780.1484530.9297
Module end 'content' 0.92890.0014 1,311.078112.1406
Script end 0.9303  1,323.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4446160.0003
Check MTime0.00220.2312160.0001
Mysql Total
Database connection0.00540.580010.0054
Mysqli_queries0.872593.7882540.0162
Looping result0.00060.0680520.0000
Template Total0.884795.120.4423
Template load0.00210.222720.0010
Template processing0.882694.872520.4413
Template load and register function0.00010.014310.0001
states
state_id_array0.00160.166710.0016
state_identifier_array0.00200.211620.0010
Override
Cache load0.00170.1805140.0001
Sytem overhead
Fetch class attribute can translate value0.00130.141920.0007
Fetch class attribute name0.00090.099840.0002
XML
Image XML parsing0.00280.305120.0014
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00240.2533220.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs