Thanks to the watchful eye of Patrick Roemer, there’s a newer, slightly
sturdier PageTemplate available.
0.3.2 is just a bug fix version, but you’ll probably want it anyways.
After all, one less bug is one less bug, right?
Here’s the download page:
… and here’s the documentation page:
Okay, folks. Have fun with it!
CHANGES FROM 0.3.1
- Fixed regexp which resulted in error messages for value directives
requesting variable names ending with glossary keywords
(bug found and fix suggested by Patrick Roemer)
Use PageTemplate.rb to create output based on template pages and the
code of your program. This package is inspired by Sam Tregar’s
HTML::Template package for Perl. Its main intent is to separate design
and code for CGI programs, but it could be useful in other contexts as
well (Ex: site generation packages).
PageTemplate.rb is distributed under the MIT License.
As a side note: if you are using PageTemplate in your projects, or add
features to your copy, I’d love to hear about it.
- Variable substitution
- If and If/Else structures
- Loops and Loop/Else structures
- Customizable Syntax
- Caching template information for improved performance