NodeID in a menu (admin)

Author Message

Jacques Feix

Friday 12 October 2007 5:39:13 am

Hi,
I have created a new item in my admin menu

in admininterface.ini.append.php :

[AdditionalMenuSettings]
ContextMenuTemplateArray[]=node/importXMLDatacontextmenu.tpl

and importXMLDatacontextmenu.tpl

<a id="menu-import-xmldatar" href="/importXMLData/form/$nodeID" onmouseover="ezpopmenu_mouseOver( 'ContextMenu' )">{"Import XML"|i18n("importXMLData")}</a>

I see my menu but the $nodeid is not good. How can I catch it ?
thx

Jacques Feix

Monday 15 October 2007 1:55:10 am

Nobody knows ?
I have seen som "%nodeID%" in some templates, but it doesn't work in my case ..

Fabien Mas

Monday 15 October 2007 2:10:24 am

Here is the way :)

<script language="JavaScript1.2" type="text/javascript">
<!--
menuArray['ContextMenu']['elements']['menu-import-xmldatar'] = new Array();
menuArray['ContextMenu']['elements']['menu-import-xmldatar']['url'] = {"/importXMLData/form/%nodeID%"|ezurl};
// -->
</script>
<hr/>
<a id="menu-import-xmldatar" href="#" onmouseover="ezpopmenu_mouseOver( 'ContextMenu' )">{"Import XML"|i18n("importXMLData")}</a>

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 16:05:52
Script start
Timing: Jan 18 2025 16:05:52
Module start 'layout'
Timing: Jan 18 2025 16:05:52
Module start 'content'
Timing: Jan 18 2025 16:05:54
Module end 'content'
Timing: Jan 18 2025 16:05:54
Script end

Main resources:

Total runtime1.5036 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 591.4297152.6250
Module start 'layout' 0.00580.0040 744.054739.4297
Module start 'content' 0.00971.4924 783.4844472.7734
Module end 'content' 1.50210.0015 1,256.25788.4922
Script end 1.5036  1,264.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2304160.0002
Check MTime0.00140.0898160.0001
Mysql Total
Database connection0.00070.044310.0007
Mysqli_queries1.451396.5163570.0255
Looping result0.00080.0547550.0000
Template Total1.471197.820.7355
Template load0.00220.146420.0011
Template processing1.468997.686220.7344
Template load and register function0.00030.019610.0003
states
state_id_array0.00120.081710.0012
state_identifier_array0.00230.153920.0012
Override
Cache load0.00190.1233240.0001
Sytem overhead
Fetch class attribute can translate value0.00100.068020.0005
Fetch class attribute name0.00170.113230.0006
XML
Image XML parsing0.00040.027720.0002
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00070.0457100.0001
String conversion0.00000.000840.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
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/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: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs