Re: [SMARTY] Using smarty variables inside {php} {/php} blocks

From: Date: Wed, 04 Sep 2002 21:00:41 +0000
Subject: Re: [SMARTY] Using smarty variables inside {php} {/php} blocks
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5929@lists.php.net to get a copy of this message
I don't have time to test it right now, but I would expect the same code: $this->_tpl_vars["bar"]; to work with {include_php} as well. That is assuming that {include_php} is just a wrapper for PHP's include. Ben On Wednesday, Sep 4, 2002, at 21:50 Europe/London, Jorge Restrepo - WebTeam wrote:
I've got a similar question, but about using smarty variables in include_php files.\
-----Original Message----- From: Jaime Ashander [mailto:JaimeA@dis-corp.com] Sent: Wednesday, September 04, 2002 3:32 PM To: smarty-general@lists.php.net Subject: [SMARTY] Using smarty variables inside {php} {/php} blocks So, I think I may have had this working at one point, but now whenever I try it things go wrong. Example: Foo.php: ------------------ <?php #my smarty is an innocent subclass that simply sets directories require_once 'my_smarty.inc'; $smarty= new My_Smarty(); $smarty->assign('bar', 'I want to be displayed'); $smarty->display('foo.tpl'); ?> Foo.tpl: ------------------ <html> <body> <!-- random code--> Displayed via smarty: {$bar} <br> Displayed via php: {php} $bar {$bar} {/php} </body> </html>
-- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
(q) Ben Godfrey? (a) Developer and Designer, See http://aftnn.org/ for details

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