Blame | Letzte Änderung | Log anzeigen | RSS feed
createTemplate()returns a template objectDescription===========Smarty\_Internal\_TemplatecreateTemplatestringtemplateobjectparentSmarty\_Internal\_TemplatecreateTemplatestringtemplatearraydataSmarty\_Internal\_TemplatecreateTemplatestringtemplatestringcache\_idstringcompile\_idobjectparentSmarty\_Internal\_TemplatecreateTemplatestringtemplatestringcache\_idstringcompile\_idarraydataThis creates a template object which later can be rendered by the[display](#api.display) or [fetch](#api.fetch) method. It uses thefollowing parameters:- `template` must be a valid [template resource](#resources) type andpath.<!-- --><?phpinclude('Smarty.class.php');$smarty = new Smarty;// create template object with its private variable scope$tpl = $smarty->createTemplate('index.tpl');// assign variable to template scope$tpl->assign('foo','bar');// display the template$tpl->display();?>See also [`display()`](#api.display), and[`templateExists()`](#api.template.exists).