ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zope-cmf
zope-cmf
Re: [Zope-PTK] Member Roster for Membership
by Bill Anderson other posts by this author
Sep 28 2000 11:27PM messages near this date
[Zope-PTK] Member Roster for Membership | Re: [Zope-PTK] Member Roster for Membership
Michael Bernstein wrote:
>  
>  Bill Anderson wrote:
>  >
>  > Michael Bernstein wrote:
>  > >
>  > > I swiped some code out of the ManageMembers method in Membership, and
>  > > I'm trying to implement a functional member roster as the index_html of
>  > > a 'members' folder.
>  > >
>  > > the code fragment in question is this:
>  > >
>  > > <dtml-in getMembers sort=id >
>  > > <tr>
>  > >  <td>
>  > >  <dtml-if "getUserName">
>  > >  <a href="/members/&dtml-getUserName;/"> <dtml-var getFullName>
>  > > (&dtml-getUserName;) </a>
>  > >  <dtml-else>
>  > >  <dtml-var getFullName> (&dtml-getUserName;)
>  > >  </dtml-if>
>  > >   </td>
>  > > </tr>
>  > > </dtml-in>
>  > >
>  > > I want the <dtml-if> to test for the existence of a folder (contained
>  > > within /members) that has an identical id as the member. That way this
>  > > will display a link only if they have a folder.
>  >
>  > how about (UNTESTED!!!):
>  >
>  > <dtml-if "getUserName() and Members.hasattr(getUserName())">
>  
>  Here is the syntax that works:
>  
>  <dtml-if "_.hasattr(PARENTS[-1].members, getUserName())">
>  
>  Bill's suggestion put me on the right track, and a search
>  through the archives revealed the following posting from
>  Chris McDonough:

Cool.

>  http://lists.zope.org/pipermail/zope/2000-April/024628.html
>  
>  Which gave me the last piece of the puzzle. Just goes to
>  show you that all Zope Zen is contained within the archives
>  ;-)

The first lesson of Zope Zen:
  "All Zen is within the archives."
The Second Lesson of Zope Zen:
  "All Zen not bounded by the archives, is contained within the source."

:-)



>  
>  This should be useful for anyone who wants to implement a
>  portal where only *some* members have a home folder. The
>  current all-or-nothing approach of both the PTK and
>  membership seems limiting.

Remember, that's just the implementation design PortalMembership, which
is aimed at portals, without member folders. The forthcoming
CommunityMembership will  provide for member folders, and will naturally
not be an all-or-nothing proposal.
 

--
E PLURIBUS LINUX
Thread:
Michael Bernstein
Bill Anderson
Michael Bernstein
Bill Anderson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved