Custom menu

Author Message

Mark Emms

Thursday 01 February 2007 3:04:00 am

Hi

This is my first site - I am familiar with PHP but need a bit of help to get me going with template customising.

3 part question this one:

1. Top navigation

I want to create navigation that allows the choice of 4 sub sites across the top of the page - this is to be displayed throughout the site but the graphics change depending upon the sub site you are in..

I have created 4 content nodes each of which is the top of one of these sub-sites and I've built an override template to display the 4 sub site navigation across the top of the page but need 4 versions of the navigation and want to use the switch operator to distinguish between them but I'm not sure how - all I'm after is the syntax and the operator I'd use to check which node is the level 2 ancestor of the page being viewed..

2. Left menu navigation

This should only display the subtree relating to the sub site being viewed i.e. not displaying level 1 (ez root) or level 2 (the sub site home), but just displaying levels 3 to 5. I have sorted out the presentation css etc now just need the logical bits!

3. I don't want the eZ publish "root" node displaying in the breadcrumbs - how do I change that?

Help very much appreciated.

Many thanks

Mark Emms

Friday 02 February 2007 2:58:37 am

On Number 2

create an override for leftmenuflat based upon the original file

change

{let docs=treemenu( $module_result.path,
                    is_set( $module_result.node_id )|choose( 2, $module_result.node_id ),
                    ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
                    1, 5 )
                    depth=1
                    last_level=0}

to

{let docs=treemenu( $module_result.path,
                    is_set( $module_result.node_id )|choose( 2, $module_result.node_id ),
                    ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
                    2, 5 )
                    depth=1
                    last_level=0}

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 04:19:27
Script start
Timing: Jan 31 2025 04:19:27
Module start 'layout'
Timing: Jan 31 2025 04:19:27
Module start 'content'
Timing: Jan 31 2025 04:19:29
Module end 'content'
Timing: Jan 31 2025 04:19:29
Script end

Main resources:

Total runtime1.1219 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.0078151.1953
Module start 'layout' 0.00480.0025 739.203136.6094
Module start 'content' 0.00731.1138 775.8125886.3516
Module end 'content' 1.12110.0008 1,662.164111.8906
Script end 1.1219  1,674.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.2491160.0002
Check MTime0.00120.1036160.0001
Mysql Total
Database connection0.00070.064210.0007
Mysqli_queries1.070795.4339520.0206
Looping result0.00050.0432500.0000
Template Total1.092197.320.5461
Template load0.00220.199820.0011
Template processing1.089997.139920.5449
Template load and register function0.00120.105410.0012
states
state_id_array0.00130.118310.0013
state_identifier_array0.00140.125620.0007
Override
Cache load0.00190.1713230.0001
Sytem overhead
Fetch class attribute can translate value0.00050.042210.0005
Fetch class attribute name0.00200.174730.0007
XML
Image XML parsing0.00190.166610.0019
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00360.3241160.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
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
3content/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: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs