Forums / Setup & design / Where is the {menu} function ?

Where is the {menu} function ?

Author Message

H-Works Agency

Sunday 27 August 2006 7:57:24 pm

I can't find anywhere in the doc the 'menu' function.

What are we supposed to do to use those left/top menus ? Do we have to use 'include' ?

Why is {menu name=DoubleTop} doesn't work ?

Thanx for those clarifications cause i never understood this issue since 2 years i am on EZP.

Martin Harispuru
LAMP - EZP 3.8.3

EZP is Great

Norman Leutner

Sunday 27 August 2006 11:24:55 pm

There are different ways og including a menu.
You may simply include the a prebuild ez menu or build and include your own one.

Including a menue works like any other template:

{include uri="design:left_menu.tpl"}

There are different ez menues which you can find under /design/base/templates/menu
Just take a look at them.

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Claudia Kosny

Monday 28 August 2006 12:11:50 am

Hello Martin

In addition to what Norman said also have a look at the menu.ini. Here you can better see what menus are available.

The 'DoubleTop' is just a group name which is useful to select the menu style when using the admin interface for EZ, it is not the name of the menu itself. The actual name of the menu is TopMenu, as you can see in the menu.ini. The menu.ini maps these menu names to the names of the templates that are used to display the menu. You can find the templates in the folder Norman mentioned.

This way you can also add your own menus, just create a template, name it accordingly, include it in the menu.ini and call it in your pagelayout.

Example:
I have two left menus that are included on a certain condition.
My menu.ini.append.php looks like this (just the relevant part)

[LeftTop]
TitleText=Left and top
MenuThumbnail=menu/left_top.jpg
TopMenu=flat_top
LeftMenu=flat_left
ProductLeftMenu=product_left

I included the menus in pagelayout.tpl like this:

{menu name=TopMenu}
.
.
.
{if <condition>}
{menu name=LeftMenu}
{else}
{menu name=ProductLeftMenu}
{/if}

The template for the ProductLeftMenu has the filename product_left.tpl and is located in the folder
\design\<name of site design>\templates\menu

Greetings from Luxembourg

Claudia

H-Works Agency

Monday 28 August 2006 1:17:45 am

Ok thanx a lot !!!

I finally understand the usage of the menu system.

Its still strange the reference documentation doesn't show the menu template function.

Martin Harispuru

EZP is Great

eZ debug

Timing: Jan 18 2025 18:38:25
Script start
Timing: Jan 18 2025 18:38:25
Module start 'content'
Timing: Jan 18 2025 18:38:26
Module end 'content'
Timing: Jan 18 2025 18:38:26
Script end

Main resources:

Total runtime0.8221 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.8438180.8359
Module start 'content' 0.00650.6922 769.6797600.2344
Module end 'content' 0.69870.1233 1,369.9141337.4063
Script end 0.8220  1,707.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5021210.0002
Check MTime0.00160.1930210.0001
Mysql Total
Database connection0.00090.112110.0009
Mysqli_queries0.742890.35141990.0037
Looping result0.00190.23101970.0000
Template Total0.795296.720.3976
Template load0.00210.251220.0010
Template processing0.793196.472220.3966
Template load and register function0.00010.014310.0001
states
state_id_array0.00090.114810.0009
state_identifier_array0.00080.098820.0004
Override
Cache load0.00170.2109390.0000
Sytem overhead
Fetch class attribute can translate value0.00140.174040.0004
Fetch class attribute name0.00100.126260.0002
XML
Image XML parsing0.00140.165040.0003
class_abstraction
Instantiating content class attribute0.00000.001970.0000
General
dbfile0.00330.3982350.0001
String conversion0.00000.000730.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
3content/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
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/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: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs