xslate/Catalyst::View::Xslate wrapper
Asked Answered
D

1

2

I have a Catalyst application that uses TT for views: https://metacpan.org/module/Catalyst::View::TT

and I would like to try out https://metacpan.org/module/Catalyst::View::Xslate

We use the WRAPPER directive with Template Toolkit and I am curious if it is at all possible to reuse the wrapper somehow with xslate or would I have to break them into headers and footers?

Delaminate answered 19/12, 2012 at 23:8 Comment(0)
P
1

You can in theory, by using TTerse syntax. According to the manual, enabling this allows you to use a lot of TT compatible code, including a simple WRAPPER statement.

However, there are caveats, as documented here. Given the philosophical differences between Xslate and TT, you might find it easier to bite the bullet and just rewrite your wrapper as header and footer Xslate code.

Or hold off on Xslate until your next project. Like horses, Templating engines are difficult to change mid-stream. :-)

Paulpaula answered 20/12, 2012 at 2:1 Comment(1)
Thanks! That is what I am starting to think.Delaminate

© 2022 - 2024 — McMap. All rights reserved.