On 12/5/06, Perrin Harkins <[EMAIL PROTECTED]> wrote:
It can be really easy to add custom view code to TT templates. You can
immediately load any class and just call it:
[% USE MyView %]
[% MyView.method(arg) %]
Yes, but you'd need to manually use the correct class in every
template and then call the appropriate method. This can be automated
for the general case.
Or you can pass a sub ref to the stash with your data and just call it:
[% sub_ref(arg) %]
Yes, but this sub ref would need to be created somewhere else, which
would probably end up being at the controller, which is wrong.
There's no need to do anything special for TT or make a "plugin" unless
you want to do something that requires access to the TT internals.
By plugin, I meant anything that is called Template::Plugin::* and can
be USEd inside a template (since [% USE Module %] will map to
Template::Plugin::Module).
-Nilson Santos F. Jr.
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/