Forums / Developer / Easy Template Question / Comment43146
Xavier Dutoit
Friday 27 May 2005 8:44:12 am
Hi,
Good luck, Assuming the nodeid is going to be a param in the url (eg: /myextension/myfunction/42)
Another way is to use named parameters (eg: /myextension/myfunction/(nodeid)/42 )
echo "Have a look at:<br><pre>"; print_r ($Params); echo"</pre>"; // otherwise, something more useful include_once( 'kernel/common/template.php' ); $tpl =& templateInit(); if (isset ($Params['Parameters'][0])) $tpl->setVariable('nodeid',$Params['Parameters'][0]); //named parameters foreach ($Params[UserParameters] as $param => $value) $tpl->setVariable( $param, $value );
Then you can use it into the template as any variable.
I guess that's just a test, as otherwise they are easier ways of listing all folders in a node ;)
X+
http://www.sydesy.com