in reply to Re^2: Evaluating subroutines from within data
in thread Evaluating subroutines from within data
graff, I have looked at both of those modules, and neither would do the templating I need for my site
Those are brave words, I highly doubt TT2 wouldn't be able to accomplish what you need :)
For example
print_definitions( file => "some_file_a.txt", headings => [ "term", "definition" ], )
in tt2 you could write as
[% INCLUDE print_definitions.tt file = "some_file_a.txt" headings = [ "term", "definition" ] content = "this ends up in variable content " %]
Or even as
[% WRAPPER print_definitions.tt file = "some_file_a.txt" headings = [ "term", "definition" ] %] this ends up in variable content [% END %]
See http://search.cpan.org/perldoc/Template::Manual::Directives#INCLUDE,
http://search.cpan.org/perldoc/Template::Manual::Directives#WRAPPER
http://search.cpan.org/perldoc/Template::Tutorial::Web
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Evaluating subroutines from within data
by Lady_Aleena (Priest) on Jan 08, 2012 at 02:45 UTC | |
by Anonymous Monk on Jan 08, 2012 at 04:23 UTC | |
by Lady_Aleena (Priest) on Jan 08, 2012 at 06:21 UTC | |
by chromatic (Archbishop) on Jan 08, 2012 at 08:00 UTC |