You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Apache Wiki <wi...@apache.org> on 2006/09/20 01:23:07 UTC

[Jakarta-velocity Wiki] Update of "TemplateNameFilter" by ClaudeBrisson

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-velocity Wiki" for change notification.

The following page has been changed by ClaudeBrisson:
http://wiki.apache.org/jakarta-velocity/TemplateNameFilter

New page:
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.


Source file:

TemplateNameFilter

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org