Re: general question about smarty

From: Date: Wed, 23 May 2001 17:15:55 +0000
Subject: Re: general question about smarty
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-801@lists.php.net to get a copy of this message
> > there can be less errors in the code. Smarty introduces no secholes, > > and if you disable the 'PHP code inside templates' features, designers > > can't break the server with bad templates... > only prints cant break things either, see my question 4 Can you restrict these PHP files you give to the designer to only use print() functions? Technically. Not just in words... Smarty offers a simple syntax, where you need not know about objects, code blocks, sechole problems, etc... > i have one template file that looks like this (the general page layout) > ---TEMPLATE.PHP--- > > <?php > if( !$mainNavi ) $mainNavi = "defaultpage.php"; > if( !$subNavi ) $subNavi = "defaultpage.php"; > if( !$content ) $content = "defaultpage.php"; > ?> > <html><body> > <table border="1"> > <tr> > <td colspan="2"> > <?php include($mainNavi); ?> > </td> > </tr> > > <tr> > <td valign="top"> > <?php include($subNavi); ?> > </td> > > <td width="90%" valign="top"> > <?php include($content); ?> > </td> > </tr> > </table> > </body></html> Then what you do, if you need to present this content in a text-only (table free format), on a WAP browser, in Hungarian, with another page design, in XML format, etc... With templates the programmer is not involved in the modifications listed above... Goba ........................................................... . . . . . Editor of the Hungarian PHP manual, Admin of the Hungarian PHP mirror

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