PHP
  Home arrow PHP arrow Page 9 - Web Development With PHP FastTemplate
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
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

Web Development With PHP FastTemplate
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2001-09-05

    Table of Contents:
  • Web Development With PHP FastTemplate
  • Who Am I?
  • Proofing The Pudding
  • You've Got Mail
  • Repeat Customers
  • Flavour Of The Month
  • A Strict() Master
  • Musical Chairs
  • A Rose By Any Other Name...

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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


    Web Development With PHP FastTemplate - A Rose By Any Other Name...


    (Page 9 of 9 )

    So that's one look - but now how about changing it so that the quick link boxes appear in a column on the left, with the main story taking up the rest of the page?

    With FastTemplate, altering the layout is a snap - it merely involves editing the "main.tpl" and "list.tpl" templates.

    <!-- begin: main.tpl --> <html> <head> <basefont face="Verdana"> </head> <body link="Navy" vlink="Navy" alink="Navy"> <!-- standard header --> <table width="100%"> <tr> <td bgcolor=navy height=50> </td> </tr> </table> <table width="100%" border="0" cellspacing="10" cellpadding="10"> <tr> <td valign=top> {LINKS} </td> <td valign=top> {ARTICLE} </td> </tr> </table> <!-- standard footer --> <hr> <center><font size=-2>All content copyright and proprietary Melonfire, 2001. All rights reserved.</font></center> </body> </html> <!-- end: main.tpl --> <!-- begin: list.tpl --> <table border=1 cellspacing=0 cellpadding=5> <tr><td align=center bgcolor="black"> <font color=white><b>{SECTION_TITLE}</b></font> </td></tr> <tr><td> <ul> {LIST} </ul> </td></tr> </table> <p> <!-- end: list.tpl -->
    In this case, I've simply set up a new table structure for the main page to accommodate the new layout. And when I run the PHP script (without changing a single line of code), here's what I get:



    Why stop there? Let's do away with the link boxes altogether, and have the links appear in neat rows at the bottom…

    <!-- begin: main.tpl --> <html> <head> <basefont face="Verdana"> </head> <body link="Navy" vlink="Navy" alink="Navy"> <!-- standard header --> <table width="100%"> <tr> <td bgcolor=navy height=50> </td> </tr> </table> <p> {ARTICLE} <p> {LINKS} <!-- standard footer --> <hr> <center><font size=-2>All content copyright and proprietary Melonfire, 2001. All rights reserved.</font></center> </body> </html> <!-- end: main.tpl --> <!-- begin: list.tpl --> <font size=-1> New in <b>{SECTION_TITLE}</b>... <br> {LIST} </font> <p> <!-- end: list.tpl --> <!-- begin: listitem.tpl --> <a href="story.php?id={ID}"><font size=-1>{ITEM}</font></a>     <!-- end: listitem.tpl -->
    In this case, I've altered three of the templates to remove the tables and list constructs, so that I'm left with a very simple and elegant layout.



    As you can see, FastTemplate makes it possible to separate the user interface from the program logic, thereby allowing designers with little or no programming knowledge to alter Web pages quickly and easily. Further - with its ability to nest and repeat chunks of HTML code, it can speed up development time significantly, and also reduce the effort involved in maintaining and modifying a Web application.

    That's about it from me. In case you're looking for more information, you should consider visiting the following links:

    The FastTemplate home page: http://www.thewebmasters.net/

    PHPBuilder's FastTemplate tutorial: http://www.phpbuilder.com/columns/sascha19990316.php3

    The original (Perl) FastTemplate module: http://www.sober.com/

    Till next time...stay healthy!
    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

       

    PHP ARTICLES

    - Using Aliases and the Autoload Function with...
    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Sub Classing Exceptions in PHP 5
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT