Re: template engine...why???

From: Date: Wed, 30 Apr 2003 13:19:07 +0000
Subject: Re: template engine...why???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145770@lists.php.net to get a copy of this message
To separate logic & content from design. Depending on the template system you use, you can separate your PHP code from your HTML/CSS/etc. Then you can have a web design expert design your pages and you just "plug-in" the content. Or, you could allow your client to customize the view if they know HTML. For instance, changing the order of columns in a list view, or even which columns are displayed. By separating you content from the design, you can also easily switch display platforms. What if you client wants to access the system from their cell phone? With the right template system, you don't have to change any of the PHP code you've already done, just the template file used to display the data. I don't use any of the template systems out there since they were much more than I needed. I use output buffering (ob_start) to load template files into variables and replace (str_replace) custom data tags with real data. It's very simple to implement and I can alter a design knowing that I won't break my code. On Tuesday, April 29, 2003, at 09:18 PM, Ryan A wrote:
Why use a template engine? -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577


« previous php.general (#145770) next »