iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar 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.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-25-2005, 08:15 PM
WebProWorld Pro
 
Join Date: Jul 2003
Location: Canada
Posts: 272
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
Reply With Quote
  #2 (permalink)  
Old 11-26-2005, 01:30 PM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
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.
Reply With Quote
  #3 (permalink)  
Old 11-29-2005, 05:51 PM
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

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

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



All times are GMT -4. The time now is 05:41 PM.



Search Engine Optimization by vBSEO 3.3.0