Forums / Developer / how to use a parameter in a template operator?
Alessandro Cipriani
Wednesday 31 March 2004 9:20:57 am
hi alli modified my lib/eztemplate/classes/eztemplatestringoperator.php by adding a simple function to store a variable in session.
// set the session Variable case $this->SettaSessionVariable: { $http =& eZHTTPTool::instance(); $operatorValue=""; $http->setSessionVariable( $operatorValue, "hello" ); $operatorValue="ok"; } break;
i call the function from my *.tpl file in this way: {"user_name"|setta_sessionvariable}and the result i get is to have the session variable "user_name" with value "hello".
now i'd like to enter the value the session variable will have as a parameter (in this way i must be able to set any value to my variable name, not only "hello").
my question is: how to set the parameters in the call to the function (in my tpl file) and how to manage the parameter in the php file?
best regardsalessandro
Script start
Module start 'content'
Module end 'content'
Script end
Time used to render debug report: 0.0001 secs