[Zope] Can't nest dtml-in using prefix ...

Jesper Steen Steffensen jsteffensen at gmail.com
Fri Jul 28 18:15:02 EDT 2006

> Give more info.  Define qry_user_roles and qry_roles as part of your
> question.
> Why are you using DTML?  Its a *dying art*.  I can hardly look at it
> anymore :-)
> DTML is depreciated in Zope (I think) and new people should go right to
> Page Templates and Python Scripts (Im sure).
> Can you code this in a Python Script?
> David
> qry_user_roles and qry_roles are two ZSQL methods that both contain data
fields called 'role'. They both work fine on my pages apart from the
nesting. One qry holds all possible roles in the system - the other one
associates roles to users. I need the dtml-if to insert the word "selected"
in a html drop-down box, so that the users role will be selected when the
drop-down box displays:

This will iterate over the roles and build the drop-down box:

<dtml-in qry_roles>
<option><dtml-var role></option>

This should display the proper value as well:

<dtml-in qry_roles prefix="outer">

     <dtml-in qry_users_roles>
     <dtml-if expr="outer_role==role">

><dtml-var role></option>

I'm 1 month into Zope now, so this is just what I've read from the Zope
bible/ web etc. so far ...

Is dtml really dead?!? :-o
 Shame - I like it.. Will read more about page templates then ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060729/d3737681/attachment.htm

More information about the Zope mailing list