[Zope] ZPT idiom

Richard Wesley hawkfish@electricfish.com
Tue, 21 May 2002 13:06:39 -0700


At 3:37 PM -0400 5/21/02, Jim Penny wrote:
>Speaking of idiom:
>
>which do people feel is better:
>
><input name="test" tal:attributes="value request/foo">
>or
><input name="test" value="dummy" tal:attributes="value request/foo">
>
>That is, should the value= tag be given when it is going to be replaced
>by a tal?  (Both forms work, I am concerned about readability and
>pedagogy.)

It depends on how you want the page source to look when rendered in a 
web editor or browser.

>What about
>
><input type=checkbox name=test2
>   tal:attributes="checked request/foo | nothing">
>vs.
><input type=checkbox name=test2 checked
>   tal:attributes="checked request/foo | nothing">
>
>Again, both forms have been tested, does the latter form help or hinder
>readability?

Same here.
Sincerely,

Richard Wesley
Co-President, Electric Fish, Inc.
<http://www.electricfish.com/>
+1-206-634-2926 (v)
+1-206-634-2921 (f)