RE: [SMARTY] DB Contains Smarty Tags..

From: Date: Tue, 21 Jan 2003 02:45:01 +0000
Subject: RE: [SMARTY] DB Contains Smarty Tags..
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7282@lists.php.net to get a copy of this message
If I'm understanding your problem, you might try one of two things. Using eval: -------- php: <?php $db_data = 'blah blah {thisURL}'; ?> -------- template: {eval var=$db_data assign="foo"} {$foo} Or, as messju said, you can create a resource plugin that grabs database data as a template, and {include} it in your parent template. This method would have better performance than grabbing the data first and then evaling it, since evals are compiled at every invocation. Hope this helps, Gary >-----Original Message----- >From: Eric Coleman [mailto:eric.coleman@zaireweb.com] >Sent: Monday, January 20, 2003 12:10 PM >To: smarty-general@lists.php.net >Subject: [SMARTY] DB Contains Smarty Tags.. > > >Alright, I have content coming from the database, and it has >something like > >{thisUrl} in it, which is a custom function I have > >The problem im runing into now, is that smarty won't parse it >since im assignin' the data right from the database to the template.. > >How can I get it to parse and run it's replacement son the >data in the database before I assign it to somewhere else? > >-- >Eric Coleman >eric.coleman@sitemod.net >sitemodCMS - http://sitemod.net >

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