Jesper Steen Steffensen wrote:
Hi Jesper, I guess Jonathan does have a point. DTML is NOT DEAD as in NOT BREATHING. And its true that Zope will continue DTML well into Zope 3. But its expertise "base" is fading. I last used it 2 years ago. Many of us just don't use it anymore. Most still use it because of legacy code. I don't think Jonathan would recommend it to a newbie? :-) Python + zpt is a clearer model. Here is some code to consider if you want to try the Page Template + python way ... # -------------------------------- # The python way (untested) # -------------------------------- outer = context.SQL.qry_user_roles() inner = context.SQL.qry_roles() options = '' for o in outer: for i in inner: if o.role == i.role: options += '\n<option value="' + i.role + '">' + i.role + '</option>' return '<select>' + options + '</select>' # -------------------------------- # in ZPT # -------------------------------- <tal:sel tal:replace="structure python:context.python.pyRolesSelect()"> </tal:sel> I will say that learning Page Templates will give you fits for a week or two. But stick with it. David |
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )