Re: [SMARTY] nested template vars

From: Date: Mon, 14 Jun 2004 16:40:50 +0000
Subject: Re: [SMARTY] nested template vars
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11458@lists.php.net to get a copy of this message
antonio wrote:
hi all smarty users, I have a problem with nested vars: in my tpl I have a var {$text}, but this can contain other vars, i.e {$image}. {$text} is stored in a db how can I do it?
sounds like you're trying to mix variables and sub-templates. if i understand correctly, {$text} is supposed to contain smarty logic, too. in that case, write a resource plugin that fetches the req'd content from your DB. see http://smarty.php.net/manual/en/plugins.resources.php and http://smarty.incutio.com/?page=SmartyResourceHandlers for help. cheers mb -- God, root... where's the difference? (Pitr, www.userfriendly.org) Please use my public PGP key: http://www.mbant.de/mbant-gpg-key

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