Author Topic

Xavier Dutoit

Friday 27 May 2005 8:44:12 am

Comment43146

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