You've already passed the name of the block to your wrapper, so just
process it by name:

--bigtable.tt--
<table>
<tr>
<td>foo</td>
[% IF sidebar %]<td>[% PROCESS $sidebar %]</td>[% END %]
</tr>
</table>

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Thomas, Mark - BLS CTR
> Sent: Tuesday, September 27, 2005 5:05 PM
> To: [email protected]
> Subject: [Templates] Passing a BLOCK to another template?
> 
> 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 %]
>  ...
> [% WRAPPER bigtable.tt   sidebar=mysidebar %]
> content
> [% END %]
>  
> --bigtable.tt--
> <table>
> <tr>
> <td>foo</td>
> [% IF sidebar %]<td>[% sidebar %]</td>[% END %]
> </tr>
> </table>
>  
>  
> This doesn't work, so how else can I accomplish this?
>  
> Thanks!
> - Mark.
> 
> 
> _______________________________________________
> templates mailing list
> [email protected]
> http://lists.template-toolkit.org/mailman/listinfo/templates
> 

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to