Re: Website templating schemes

From: Date: Tue, 02 Sep 2003 14:56:52 +0000
Subject: Re: Website templating schemes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-161440@lists.php.net to get a copy of this message
Search google for Smarty (I believe it's www.smarty.php) It's a great way of separating output from the logic using templates. Ronald "Joel Konkle-Parker" <jjk3@msstate.edu> schreef in bericht news:1061915173.3f4b8a25b9c68@webmail.msstate.edu... > I'm trying to make a PHP-backed website, and I'm trying to decide between two > templating schemes: > > 1. define 2 php template files: header.php, footer.php. in index.php, require > header.php, output content, require footer.php > > 2. define a php template file and a local page file. index.php defines body() > and crequires template.php. template.php prints the header, calls body() to > print the content, and and prints the footer. > > I'm currently using the second method, but I've only seen the first used > elsewhere. Is there a reason that #1 is better than #2 (or is anything else even > better than that?)? > > > -- > Joel Konkle-Parker > Webmaster [Ballsome.com] > > Phone [662-518-1636] > E-mail [jjk3@msstate.edu]

« previous php.general (#161440) next »