In article <[EMAIL PROTECTED]>, Andrew Brosnan wrote:
> In the docs, regarding nested loops it says:
>
> $template->param(LOOP => [{ name => 'Bobby',
> nicknames => [{ name => 'the big bad wolf' },
> { name => 'He-Man' },
> ],
> },
> ],
> );
>
> so assuming each iteration of the loop might not contain nested loop
> data, what would the tmpl look like?
>
><!-- TMPL_LOOP name="LOOP" -->
> <!-- TMPL_VAR name="name" -->
> <!-- TMPL_IF nicknames -->
> <!-- TMPL_LOOP name="nicknames" -->
> <!-- TMPL_VAR name="name" -->
> <!-- /TMPL_LOOP -->
> <!-- /TMPL_IF -->
><!-- /TMPL_LOOP -->
>
> I'm assuming nicknames is the name of the nested loop, but this is not
> working for me. I'm a little, uhh, confused.
Andrew,
This example seems like it should work to me. If nicknames appears on
some loops and not others, your options are:
1. Set nicknames => undef for the loops it has no data.
2. Make sure die_on_bad_params=>0 and leave out nicknames all together
on some loops.
Mark
--
http://mark.stosberg.com/
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users