Forums / Developer / NodeID in a menu (admin)
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
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>