Forums / Extensions / howto return a template with ezjscore?

howto return a template with ezjscore?

Author Message

Cristian Rinaldi

Monday 06 December 2010 12:33:12 pm

There is the possibility of invoking a function from the client using ezjscore y return a template to display for example in a div.

Gaetano Giunta

Monday 06 December 2010 1:40:20 pm

Yes, you can do it:

- either the ezjscore function is executed just via a template. For this you need to set the parameter

TemplateFunction=true

in the settings block defining your call

- or the ezjscore function is executed just via a function in a php script. Then the script runs the template and passes back the result of template execution as chunk of text:

$tpl = templateInit();
$tpl->setVariable( 'name', $value );
return $tpl->fetch( 'design:myezjscore_function/name.tpl' );

Principal Consultant International Business
Member of the Community Project Board