You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by dkeenan <da...@yahoo.co.uk> on 2013/02/21 16:39:33 UTC

Change Page template file extentions to .HTML

Hi. Is there a reasonably easy way to configure T5 so that it uses .html
files as page templates rather than .tml files?

Thanks.




--
View this message in context: http://tapestry.1045711.n5.nabble.com/Change-Page-template-file-extentions-to-HTML-tp5720147.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Change Page template file extentions to .HTML

Posted by Bob Harner <bo...@gmail.com>.
David,

Doing so is probably possible but is not recommended. It will lead to
lots of small problems that won't be worth the trouble. It would be
like renaming Microsoft Word files to use a ".txt" extension and
changing your OS to open .txt files with MS Word. You might get it to
work, but you just *know* that headaches will ensue.

The "tml" extension is defined as an internal constant
(TapestryConstants.TEMPLATE_EXTENSION) rather than a configurable
Symbol, so you can't just make a quick configuration change. That
constant is used in several places in Tapestry.

That said, if you are really determined, you *might* be able to
override or decorate the following services to achieve what you want:

    http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/internal/services/PageSource.html
    http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/internal/services/PageLoader.html
    http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/internal/services/ComponentTemplateSource.html

You'll need to spend some time reading the Tapestry sources of those
files, and searching for TapestryConstants.TEMPLATE_EXTENSION in the
sources.

You'll also have to contribute to the ResourceDigestGenerator service
to ensure that Tapestry won't directly exposed .html template sources
to the browser.

On Thu, Feb 21, 2013 at 10:39 AM, dkeenan <da...@yahoo.co.uk> wrote:
> Hi. Is there a reasonably easy way to configure T5 so that it uses .html
> files as page templates rather than .tml files?
>
> Thanks.
>
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Change-Page-template-file-extentions-to-HTML-tp5720147.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org