On 19/04/12 11:32, Patrick Rynhart wrote:
> Is it possible to dump all variables available from within a TT2
> template (or - alternatively - enumerate all variables which are
> available ?)
>
> I've had a look at this:
>
> http://template-toolkit.org/docs/modules/Template/Plugin/Dumper.html
>
> but you need to know the variables previously.
>
> (I'm wanting to list anything which is available from the upstream
> perl script - not variables defined locally in the TT2 script.)
I think this is what I'm after:

    [% USE Dumper %]
    [% FOREACH p = param %]
       [% Dumper.dump(p) %]
    [% END %]

Regards,

Patrick
>
> Thanks,
>
> Patrick
>
>
> _______________________________________________
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mailman/listinfo/templates
_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to