Re: Smarty's Smartest Practices
| From: | Mike van Lammeren | Date: | Wed, 19 Feb 2003 17:42:39 +0000 |
| Subject: | Re: Smarty's Smartest Practices | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7909@lists.php.net to get a copy of this message | ||
At 12:22 PM 2/19/03, Tom Sommer wrote:
What I do, I'm not sure you understand me (or I understand you), is that I have a file called index.tplI think that we understand each other perfectly.
This fil contains all the basic structure of the site, like tables etc. Inside index.tpl I have blocks, which can be formed to whatever I like (Currently I have my menu inside a block and my other boxes (see tsn.dk), the most importent thing about the way my templates work is that I have a variable called CONTENT, where all my content from the other files go, these other files do not contain any stucture of the site, only of the current page (Like a list of news, nothing else).That's exactly the same way I organize stuff.
This way I can keep my index and entire stucture of the site in -one- file and change it whenever I want, without EVER having to change the other pages as well.Exactly. This is also great when a minor fix is needed to support a particular browser. Let's say, for example, that some white space around an image tag is throwing off the display in certain browsers -- fix it in one place and the whole site is fixed. I think it's fair to say that everyone who responded so far is in agreement. Is there anyone that does things differently? Maybe something else works better for you? -- Mike van Lammeren Web Application Developer Emerge2 Digital Inc., "evolving business to digital" Web: http://www.emerge2.com Email: mike@emerge2.com