Basic Question: Best practices of site building.

From: Date: Wed, 21 Nov 2001 08:35:10 +0000
Subject: Basic Question: Best practices of site building.
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1996@lists.php.net to get a copy of this message
Hi, To learn a bit more about Smarty I've decided to convert my site <http://www.mapledesign.co.uk> to using the Smarty template system. Basically the site at the moment is static HTML pages, with a few dynamic ones thrown in. For a site with many .tpl, what's the best way to generate it using smarty? I've thought of the following, but would like to know what others have done. Redirect all requests through one file (as per <http://phpbuilder.com/columns/tim20000526.php3?print_mode=1> or <http://phpbuilder.com/annotate/message.php3?id=1006517>) Advantages: - only one/a small number of pages to maintain Disadvantages: - less control - looks messy (the extra directory needed) Have separate PHP pages for each existing page. Advantages: - full control over each page Disadvantages: - many files to maintain & edit. - too much repetition of code Some other method which I cannot think of. Some of you must have worked out a decent way of doing this, so I'm looking forward to hearing it ;-) Also, how do you treat custom content on the side-menus which appears on certain pages? For example, in the documentation section I need to have the chapter listing in the side-bar (the darker bar on the left-side of each page). I don't want to make a separate header.tpl for this section, as that's one more file to have to update. In other places on the site I'll also need a custom side-bar. Any suggestions? Thanks, Peter. --oOo-- Narrow Gauge on the web - photos, directory and forums! http://www.narrow-gauge.co.uk --oOo-- Peter's web page - Scottish narrow gauge in 009 http://members.aol.com/reywob/ --oOo--

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