domantas wrote:
> my source in php :
> $this->tpl->register_object('loginForm', $usersModule);
> my source in tpl :
> i need to call function "view" with param ('login') in template.
> Something like this :
> <th width="20%" colspan="4" scope="row">{loginForm->view('login')}</th>
In your PHP $usersModule->view should take parameters like this:
function view($params, &$smarty) {
$what=$params['what'];
switch ($what) {
//etc
}
return $someValue;
}
Your template code would then be like this:
{loginForm->view what="login"}{* outputs login form HTML *}
HTH
--
Max Schwanekamp
http://www.neptunewebworks.com/