WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-25-2005, 07:15 PM
ackerley1 ackerley1 is offline
WebProWorld Pro
 

Join Date: Jul 2003
Location: Canada
Posts: 247
ackerley1 RepRank 0
Default html Template Pages and PHP

I have just installed a 3rd party program to my site and while I was running through the code I noticed that is has HTML template pages for certain sections in. They have tags such as this <tag>{PHP_Variable}</tag> which I have figured are used to structure the data from a DB/PHP script.

Are there any sites where I can get more information on how to use and best uses for this type of set up?

Is this a good practice in coding or are there better ways to do this?

Thanks

Rob
__________________
Rob Ackerley
Sovereign Web Design
www.sovereignwebdesign.com
Reply With Quote
  #2 (permalink)  
Old 11-26-2005, 12:30 PM
speed speed is offline
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 823
speed RepRank 1
Default

Quote:
Are there any sites where I can get more information on how to use and best uses for this type of set up?
The only thing that springs to mind is http://smarty.php.net/ the documents should give you some ideas. It's just one of a number of template engines.
Quote:
Is this a good practice in coding or are there better ways to do this?
If you ever looked at anything I've written you'll find I nearly always use a template system as I find that it allows me to decouple the PHP from the HTML thus making it easier to maintain the HTML and also reuse the PHP on another project.

If you use large amounts of PHP mixed within the HTML then if you hand the page to a designer who is not PHP literate then it is much harder for them to work on the design. The downside of templating is that if can take additional time to process over embedding the PHP directly in to the HTML.

I use a home grown template engine as it can then be optimised for the task in hand thus minimizing the overhead associated with a template system.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory : Web Directory Script
Reply With Quote
  #3 (permalink)  
Old 11-29-2005, 04:51 PM
steve0 steve0 is offline
WebProWorld Pro
 

Join Date: May 2004
Location: Austin, TX
Posts: 199
steve0 RepRank 0
Default

Query your favorite search engine for "FastTemplate"

It is fast (hence the name) and pretty simple to use.

It uses the same structure..
__________________
Hardcore Programming Solutions and Coffee Drinker
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: html, pages, php, template



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Search Engine Friendly URLs by vBSEO 3.0.0