[prev in list] [next in list] [prev in thread] [next in thread]
List: zope-cmf
Subject: Re: [Zope-CMF] Managing Portal Roles
From: Dieter Maurer <dieter () handshake ! de>
Date: 2001-09-26 19:35:13
[Download RAW message or body]
=?iso-8859-1?Q?Jo=E3o?= Neves writes:
> I'm working on a form to permit user management similar to what is found
> in the ZMI (manage_users).
> I got to a point where I can list the Portal Roles, but nothing I've
> tried can get the roles a member already has to come up SELECTED. Here
> is a snippet of the code I'm using:
>
> 'membro' is mapped to the member being edited..
>
> <select name="roles:list" multiple>
> <dtml-in "portal_membership.getPortalRoles()">
> <option value="<dtml-var sequence-item>"<dtml-if
> membro.has_role(_['sequence-item'])> SELECTED </dtml-if>><dtml-var
> sequence-item>
> </dtml-in>
> </select>
<dtml-if "membro.has_role(_['sequence-item'])">
Note the quotes! They are essential....
Read, e.g.,
<http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>
to understand why....
Dieter
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic