On Sep 4,  2:46pm, Sam Tregar wrote:
> > [% FOREACH thing = list %]
> >   <a href="[% thing.url %]"><b>[% thing.name %]</b></a>
> > [% END %]
>
> That isn't really much better, in my opinion.  It's still too much of a
> departure from the HTML around it.

That's the point.  It's not HTML markup so you should make it look
distinctive, IMHO.

Contrast the above to HTML::Template's
>   <TMPL_LOOP list>
>      <a href="<TMPL_VAR url>"><b><TMPL_VAR name></b></A>
>   </TMPL_LOOP>

Barring a little syntax, over which we can agree to differ, that's the
same thing as the simpler example Perrin posted:

    [% FOREACH list %]
       <a href="[% url %]"><b>[% name %]</a></a>
    [% END %]

> With a little education an HTML designer can learn to manipulate the
> template syntax.  You'll have to teach them to program before they can
> deal with a full "foreach" no matter how you dress it up.

Nope, I don't agree, FOREACH and TMPL_LOOP are semantically identical
in these examples.

A



-- 
Andy Wardley <[EMAIL PROTECTED]>   Signature regenerating.  Please remain seated.
     <[EMAIL PROTECTED]>   For a good time: http://www.kfs.org/~abw/

Reply via email to