Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Nested HTML::Template usage (TT2/Xslate/sub)

by Anonymous Monk
on Aug 29, 2014 at 02:03 UTC ( [id://1098936]=note: print w/replies, xml ) Need Help??


in reply to Nested HTML::Template usage

some food for thought on other options ( TT2/Xslate/sub )

... i do crazy stuff ... can I go +1?

If the templating system you are using doesn't support the features you want, change templating systems :) like https://metacpan.org/pod/Template#INCLUDE it supports ARGUMENTs to INCLUDE, or the system of the future https://metacpan.org/pod/Text::Xslate#HTMLTemplate its got migration tools :)

Also, stop wanting crazy stuff :)

Also, don't be afraid to forget about templates :) if you're the one doing all this "templating", if there is no web designer using a WYSYWYG html editor to style your template, just write it all in perl subroutines :)

  • Comment on Re: Nested HTML::Template usage (TT2/Xslate/sub)

Replies are listed 'Best First'.
Re^2: Nested HTML::Template usage (TT2/Xslate/sub)
by skx (Parson) on Aug 29, 2014 at 18:13 UTC

    I suspect that migrating to Template::Toolkit would be significant amount of work, given how many templates/pages I'd have to handle, and also upating the loop-structures which currently get passed to HTML::Template.

    Text::Xslate looks interesting, thanks for the link. If the compatibility is 100%, or near to it, then it might make sense to examine it.

    For the moment I've written a simple perl script, (what else?), to take each of my page-snippets and the global layout file and just build a complete "layout+content" file for each one. That solves my immediate problem, and means I keep the benefit of one easy-to-update layout template.

    Although I'm largely the person responsible for the site others do contribute at times, and it would be nice to avoid adding extra hurdles to that process.

    Steve
    --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1098936]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-25 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found