RE: [SMARTY] Variables in includes

From: Date: Thu, 25 Jul 2002 15:06:58 +0000
Subject: RE: [SMARTY] Variables in includes
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5446@lists.php.net to get a copy of this message
Looks like you have some typos....braces instead of curly braces.... sl ($text} -> {$text} <BR> ($title} -> {$title} > -----Original Message----- > From: Renaud Binse [mailto:rbinse@profileup.com] > Sent: 25 July 2002 15:30 > To: smarty-general@lists.php.net > Subject: [SMARTY] Variables in includes > > > Hi, > > I've got a little problem with variable scope. Here is my code: > > Index.php: > $smarty = new Smarty(); > $smarty->assign('title', 'Title'); > $smarty->assign('text', 'Test'); > $smarty->display('main.tpl'); > > main.tpl: > <HTML> > <HEAD> > <TITLE> {$title} </TITLE> > </HEAD> > <BODY> > {include file="index.tpl"} > </BODY> > </HTML> > > index.tpl: > ($text} > <BR> > ($title} > > On my browser I get : > ($text} ($title} > > instead of "Test Title" > > Did I miss something ? > > Thanks a lot if you can help me. > >

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