[Zope] Solved: More dtml-in sequenceing and cocatenation

Jaroslav Lukesh lsh@wo.cz
Tue, 1 Jul 2003 07:59:01 +0200


: Odes=EDlatel: hpinson@indepthl.com
: To get multiple form checkboxes to load their state from a SQL=20
: generated dynamic list:
:=20
: <dtml-in SQL_getMath>
:   <input type=3D"checkbox" name=3D"dance<dtml-var sequence-number>"=20
: value=3D"1" <dtml-if expr=3D"_['math' + _.str(_['sequence-number'])] =3D=
=3D=20
: 1">checked</dtml-if>>
:   <dtml-var standard_text><br>
: </dtml-in>
:=20
: In particular:
:=20
: expr=3D"_['dance' + _.str(_['sequence-number'])] =3D=3D 1"
:=20
: I wonder if this would be easier in ZPT.  The mixing of Python and=20
: DTML tripped me up.

In ZPT you could have reach app limit, where you could not make app with
ZPT and you need make logic in python script. but with DTML I does not
reach this limit, all is possible to make with DTML. But one-line python
code in DTML is normal in some tags, like IF, IN, LET, WITH, VAR, CALL et=
c.
This code is more readable than ZPT. But ZPT is better when you give page=
s
back to your designer with default configuration of their WYSIWYG editor
(is possible to edit <a href=3D"<dtml-var some>">text</a> in properly
configured frontpage 2k without destroying! But in FP-XP is some things
impossible)

JL.