Differences between revisions 1 and 2
Revision 1 as of 2006-09-19 23:23:06
Size: 831
Editor: m186
Revision 2 as of 2006-09-19 23:23:33
Size: 791
Editor: m186
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:

Source file:


This filter is useful if you want to be able to progressively transform a static site into a dynamic site. Typically, it happens when a designer gives to the coder a static model of a site where the links between pages are functionnal but the data shown inside are frozen.

Storing the regular files and the templates in different directory trees is feasable but really painful for the coder.

Thus, we need to store the templates and the regular files in the same directory tree, distinguishing templates with a supplementary ".vtl" extension, but without breaking former URLs.

The purpose of this filter is to allow this naming convention (foo.html and bar.html.vtl) while hiding .vtl from URLs (/foo.html and /bar.html): it will add ".vtl" when the target resource is a template.

TemplateNameFilter (last edited 2009-09-20 22:06:15 by localhost)