[Zope3-dev] Re: tal:define="..." considered harmful?
Tres Seaver
tseaver at palladion.com
Mon Feb 13 11:16:48 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tonico Strasser wrote:
> I'm interested in your opinion about parameters for macros.
>
> Do you think this is explicit enough?:
>
> <ul tal:define="list main_navigation">
> <li metal:use-macro="macros/li_repeat"/>
> </ul>
>
> Or do you think explicit parameters would make things clearer?:
>
> <ul>
> <li metal:use-macro="macros/li_repeat"
> metal:with-params="list main_navigation"/>
> </ul>
I don't favor "explict arguments" for macros, becaued I don't think they
are functions. I normally document the "expected names" in a comment in
the supplying template (outside the macro itself).
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD8LC9+gerLs4ltQ4RArPaAJ9zzlHSc2LXkvFS9I4avXoiaMof6ACfaak4
TA7szsDbdsxKIF3R0t+K6Pc=
=73f6
-----END PGP SIGNATURE-----
More information about the Zope3-dev
mailing list