I'd like to add my own directives to Template Toolkit instead if adding functions and/or virtual methods via the plugin system. Is this easily doable without delving too deep into Template::Grammar
? And are there any examples I could study on CPAN?
Template Inheritance The @section directive, as the name implies, defines a section of content, while the @yield directive is used to display the contents of a given section.
Does the MACRO directive which is described in Template::Manual do what you want?
Personally I've found the best way to extend TT's behaviour is to shove subrefs in the stash:
$stash = { clever => \&do_something};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With