Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Building a Site Engine with PHP (Pt. 4)
Jul 13, 2004 @ 11:58:55

DevShed.com has posted the fourth part in their "Building a Site Engine with PHP" series. In this article, they build on the pieces before and dive into the templating system as well as the basic page loading methods.

The templates are made up of an XML document that contains each piece of our layout as a separate XML element in HTML form. At that point most people say "What!?" Well, for each element, we embed the HTML as CDATA.

Using an XML structure and a "tagging engine", they create a SimpleXML parser to work with a template class to output the various parts of the templated information. The template engine is just a plug-in for the main system, but can make for a quite powerful ally when you need a simple, clean method of unifying your site.

tagged:

Link:


Trending Topics: