PHP
  Home arrow PHP arrow Page 2 - PHP Fast Template
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

PHP Fast Template
By: Ian Felton
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 18
    2001-07-02


    Table of Contents:
  • PHP Fast Template
  • Assigning templates to objects
  • Assigning variables to FastTemplate objects
  • MySQL Data parsed through FastTemplates
  • Multiple templates: Rows of data into a table
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    PHP Fast Template - Assigning templates to objects
    ( Page 2 of 6 )

    Once the class file has been included, HTML templates can be assigned to an array for use throughout the script.

    First, a new template object must be instantiated like this:

    $tpl = new FastTemplate("../templates");
    The path in quotes points to the location of the HTML templates being used. This will vary depending upon personal preferences.

    Once the instance exists, external HTML templates are assigned to variables in the array like this:

    $tpl->define(array( "index_tpl" => "some_html_template.tpl" ));
    In the above code, "index_tpl" is arbitrary. In fact many solutions involve assigning many templates to variables within one instance.

    An example of multiple templates declared for use in a script:

    $tpl->define(array( "index_tpl" => "some_html_template.tpl", "sub_idx_tpl" => "another_html_template.tpl", "last_idx_tpl" => "last_html_template.tpl" ));




     
     
    >>> More PHP Articles          >>> More By Ian Felton
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT