tachyon-II has asked for the wisdom of the Perl Monks concerning the following question:
With Template Toolkit I can do this:
[% WRAPPER wrapper.html %] ... [% END %]
What I want to do is this
In perl $c->stash->{popup} = 1 In template [% WRAPPER popup ? wrapper_popup.html : wrapper.html %]
That can't be parsed, so I tried
[% wrapper = popup ? wrapper_popup.html : wrapper.html %] [% WRAPPER wrapper %]
But "wrapper" is interpreted as a string literal.
Question: Is their any way to make WRAPPER directive interpolate a variable?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Template Toolkit WRAPPER variations
by Anonymous Monk on Sep 02, 2013 at 07:22 UTC | |
by Anonymous Monk on Sep 02, 2013 at 07:26 UTC | |
Re: Template Toolkit WRAPPER variations
by sundialsvc4 (Abbot) on Sep 02, 2013 at 13:35 UTC | |
Re: Template Toolkit WRAPPER variations
by tachyon-II (Chaplain) on Dec 10, 2013 at 11:43 UTC |
Back to
Seekers of Perl Wisdom