Recommend this page to a friend! |
Download .zip |
Info | View files (2) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2003-11-20 (12 years ago) | 41% | Total: 1,557 This week: 1 | All time: 2,450 This week: 1,047 |
Version | License | Categories | ||||
template_handler 1.0.0 | Freely Distributable | Templates |
Description | Author | |||||||||||||
The template handler class is an efficient way of separating HTML from your PHP code. |
|
################################################# Template Handler Class ################################################# The template_handler class is a simple class designed to assist the developer in wring PHP code, without all the issues related to embeding HTML in the code. The class works on a simple principle. - Create an HTML page, and wherever you want dynamic content to be inserted on the page insert a 'tag' i.e: {content} - Using the template handler, open the template, and set the objects - display the template ======================================= sample code ======================================= <? # load the new template template $template = new template_handler(); $template->setBaseDir("templates/"); $template->setTemplate("template.htm"); $template->setObject('content','This is the content'); print $template->Retrieve(); ?> =================================== sample template =================================== <html> <body> <hr> {content} </body> </html> - |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.