Garry Heaton <[EMAIL PROTECTED]> writes:

> I have wrapper and layout library templates which define a left-column
> navigation bar. I want to pass a hash/data structure from each page template
> to the navigation library template but, as I understand it, META only allows
> simple values, not data structures. Is there a way to pass a hash from a
> page template and have it processed by a library item?

This looks similar to a problem discussed two years ago:
<http://lists.template-toolkit.org/pipermail/templates/2003-March/004350.html>

I am using a PROCESS config item:

   my $tt = Template->new({PROCESS => 'main.tt' ...

main.tt basically contains

    [% content = PROCESS $template.name %]
    [% PROCESS wrapper %]

The wrapper template is your usual wrapper, which happens to expand
the "content" variable created by the first line.  By PROCESSing and
not INCLUDEing $template.name the page template can pass anything it
wants to the wrapper.

This solution can't be all bad because it brought me a "brilliant"
by Randal L. Schwartz at that time :-)
-- 
Cheers,
haj

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

Reply via email to