setting double_top.tpl to another NodeId

Author Message

Alexandre Cunha

Friday 21 July 2006 6:16:13 am

Hi,

Im trying set the double_top.tpl to a different NodeId


{let root_node=fetch( content, node, hash( node_id, 2 ) )}
<div id="topmenu">
    <div id="topmenu-design">

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

    {let menuitems=fetch( content, list, hash( parent_node_id, 2,
                                               class_filter_type, include,
                                               class_filter_array, ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ),
                                               sort_by, $root_node.sort_array ) )}
    <ul>

Have changed the "node_id, 2" to "node_id, 218" and "parent_node_id, 2" to "parent_node_id, 218".

This change results only for the first level of the menu. The second level (sub menu) show itens under NodeId 2.

I use ezp 3.8.1

How solve this ?

http://AlexandreCunha.com

Matthew Carroll

Friday 21 July 2006 9:33:01 am

You'll also need to change the code that fetches the second level of menu items:

{let submenu_items=fetch( content, list, hash( parent_node_id, $module_result.path[1].node_id,
                                                       class_filter_type, include,
                                                       class_filter_array, ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ),
                                                       sort_by, $root_node.sort_array,
                                                       limit, 10 ) ) }

to something like this:

{let submenu_items=fetch( content, list, hash( parent_node_id, XXX,
                                                       class_filter_type, include,
                                                       class_filter_array, ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ),
                                                       sort_by, $root_node.sort_array,
                                                       limit, 10 ) ) }

...where XXX is the id of the node you want to base the second level of the menu on.

I hope that helps
Matthew

http://carroll.org.uk

Alexandre Cunha

Friday 21 July 2006 5:44:17 pm

Hi Matthew,

Thanks for your help.
Yes, this solves the problem.

For other users with the same problem, have found another interestng post:
http://ez.no/community/forum/setup_design/has_rootnode_any_effect#msg101010

http://AlexandreCunha.com

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 31 2025 01:21:25
Script start
Timing: Jan 31 2025 01:21:25
Module start 'layout'
Timing: Jan 31 2025 01:21:25
Module start 'content'
Timing: Jan 31 2025 01:21:26
Module end 'content'
Timing: Jan 31 2025 01:21:26
Script end

Main resources:

Total runtime1.3178 sec
Peak memory usage8,192.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.2656151.2266
Module start 'layout' 0.00460.0043 739.4922220.7188
Module start 'content' 0.00891.3074 960.21094,446.0781
Module end 'content' 1.31640.0014 5,406.289111.8125
Script end 1.3177  5,418.1016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2762160.0002
Check MTime0.00130.1001160.0001
Mysql Total
Database connection0.00060.047010.0006
Mysqli_queries1.220092.5808570.0214
Looping result0.00100.0774550.0000
Template Total1.241494.220.6207
Template load0.00190.141620.0009
Template processing1.239594.062620.6198
Template load and register function0.00160.120410.0016
states
state_id_array0.00180.140010.0018
state_identifier_array0.01721.302120.0086
Override
Cache load0.00150.1139250.0001
Sytem overhead
Fetch class attribute can translate value0.00200.152320.0010
Fetch class attribute name0.00280.210440.0007
XML
Image XML parsing0.00070.054120.0004
class_abstraction
Instantiating content class attribute0.00000.001240.0000
General
dbfile0.00250.1910160.0002
String conversion0.00000.000640.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs