Template-Based Web Development With patTemplate (part 2) (
Page 1 of 14 )
Got the basics down? Well, here's the advanced course - this
article demonstrates some of patTemplate's more sophisticated features,
including the ability to dynamically show or hide templates, inherit
variables, use loops and conditional branches, and create dynamic,
template-based forms and error handlers.In the first part of this article, I demonstrated the basics of the patTemplate
system, explaining how it could be used to build template-based Web
applications. I showed you how to organize your Web pages into modular
templates, and use variable placeholders in conjunction with the patTemplate API
to populate and display those templates.
In this concluding article, I
will be demonstrating a few of patTemplate's lesser-known features, together
with a few more examples, in order to give you a better understanding of the
system's capabilities. Among these features: conditional sub-templates, global
variables and variable inheritance, and template visibility. Keep
reading.