Mark,
How do you declare a block in a top-level template, and make it available in
a subtemplate used as a wrapper?
In other words, I want to do something like this:
--main.tt--
[% BLOCK mysidebar %]
sidebar stuff here
[% END %]
AFAIK, outside of main.tt, the mysidebar block is known as main.tt/mysidebar (at least that's the way I've had to handle
it in my own experience).
...
[% WRAPPER bigtable.tt sidebar=mysidebar %]
content
[% END %]
--bigtable.tt--
<table>
<tr>
<td>foo</td>
[% IF sidebar %]<td>[% sidebar %]</td>[% END %]
The problem there is that it's going to expand to "mysidebar" instead of calling the mysidebar block, right? You need
(I think)
[% PROCESS main.tt/$sidebar %]
or possibly
[% PROCESS "main.tt/$sidebar" %]
I think that should do it. HTH.
-- Buddy
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates