Re: [SMARTY] Print Smarty-code saved in database?

From: Date: Tue, 03 Feb 2004 01:04:23 +0000
Subject: Re: [SMARTY] Print Smarty-code saved in database?
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10917@lists.php.net to get a copy of this message
> > $tpl = gettpl($docid); //php function return a template > > $doc = getdoc($docid); //php function return a txt-field, Smarty code IN it. > > did you tried: > $doc = $smarty -> fetch(getdoc($docid)); Forget this, this is a little bit silly > > > > > $smarty->assign("data", $doc); // assign the txt-field This could be possible: $tpl1 = $smarty -> fetch($tpl); $smarty -> assign('content',$tpl1); content of $tpl1: {$content} and finally: $smarty->display($tpl1); // display

« previous php.smarty.general (#10917) next »