RE: [SMARTY] file name

From: Date: Tue, 28 Jan 2003 15:52:58 +0000
Subject: RE: [SMARTY] file name
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7364@lists.php.net to get a copy of this message
You can work backwards when you're learning: Separate the 'static' parts of 1.html from the 'variable' stuff in 1.html. Rename 1.html as id.tpl. whatever you want to dynamically change in id.tpl, assign it a variable name and surround it in braces: for instance, do Welcome {$username} not Welcome Fred. Then in your index.php, make a new instance of Smarty as shown in the docs, and do a $Smarty->assign('username', $userFnameFromDB); $Smarty->display('id.tpl'); The idea is you assign to Smarty any of the variable content you want in your page, then choose a template to display. Hope this gets you started. > -----Original Message----- > From: Neeraj Rattu [mailto:neeraj@interlink-marketing.net] > Sent: Tuesday, January 28, 2003 7:08 AM > To: smarty-general@lists.php.net > Subject: [SMARTY] file name > > > Hi List, > > I have just downloaded smarty and started working with it. > > Can any one please help me > > How do i publish somename.html file using smarty template. > And I want to dynamically name pages depending upon the ID of > a person from the database > > For eg ApplicantID is 1 I want to name a file as 1.html > > How do I do this? > > Please help I am new to smarty .. > > Thanks in advance > > Warm Regards, > Neeraj >

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