Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm currently working on a web application using Template Toolkit, but now I'm experiencing difficulties trying to work out the nicest way to allow dynamic includes. What I'm trying to do is have a template including other templates dynamically based on either the status of a variable, or the result of a function, so that the following could be made to work. Please note I do know that the 'header' and 'body' in the includes are taken as literals, it's this I'm trying to get round here. As part of program:
As toplevel.html
The aim of this is to allow me to associate new actions to page contents without a change either to the basic code, or to the top-level page templates. I could code up a plugin to do this, but fear reinventing wheels. Any hints? In reply to Dynamic includes in Template::Toolkit by Molt
|
|