Re: [Templates] access to the hash passed into the template
[prev]
[thread]
[next]
[Date index for 2005/01/31]
--aM3YZ0Iwxop3KEKx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
* Larry Leszczynski <larryl at emailplus.org> [2005/01/31 16:07]:
> On Sun, 30 Jan 2005, Y00R0B0T wrote:
>=20
> > thanks larry,
> >
> > but that's not what I mean. I know how to dump named variables from
> > within the template... what I want to do is dump the entire anonymous
> > hash that gets passed in...
>=20
> Sorry, misunderstood your question. The vars hash passed into your
> template gets stored in the context stash, so I suppose you could write a
> Template::Plugin, which gets $context as one of its arguments, and then
> dump out the object returned by $context->stash. Or use the stash object
> methods like $stash->get().
Sounds like the OP wants Template::Plugin::Stash[0]. The SYNOPSIS
even answers the original question:
[% USE Stash %]
[% USE Dumper Indent =3D 1%]
<pre>[% Dumper.dump_html( Stash.stash() ) %]</pre>
(darren)
[0] http://search.cpan.org/dist/Template-Plugin-Stash/
--=20
I'm astounded by people who want to 'know' the universe when it's hard
enough to find your way around Chinatown.
-- Woody Allen
--aM3YZ0Iwxop3KEKx
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iEYEARECAAYFAkH+ng8ACgkQzsinjrVhZaq5QQCeOP2e7WFOqYsFbpvC1t4shf93
7yIAoKDrXghY8JdCT2tDyHoTYJlqIKJw
=E/rd
-----END PGP SIGNATURE-----
--aM3YZ0Iwxop3KEKx--
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates