I want to take advantage of template engine i.e. smarty but within my own code
idea is to be able to load TPL file located in Theme's templates folder from within some function (PHP) i.e. get template file content independently from global $template
I tried to
$template->set_filenames( array('my_content'=>'my_content.tpl') );
$myvar = $template->parse( 'my_content', true);
but got error that file is not found
I think I may be missing something like tell $template where to look
Offline
...independently from global $template
Can you tell us how do you build your $template variable (I suppose its not the global one) ?
Offline
rvelices wrote:
...independently from global $template
Can you tell us how do you build your $template variable (I suppose its not the global one) ?
just used global $template before I make above calls
Last edited by Serge D (2015-03-11 20:08:58)
Offline