[Zope] Conditionally include based in Role

Rob Page rob.page@digicool.com
Thu, 8 Apr 1999 06:22:18 -0400


> I want to have a section of my site that only appears if the 
> user has a
> certain role. Does anyone know how to do this?

How 'bout:

<P>
Check out:
</P>
<UL>
  <LI><A HREF="/area1/">Area 1</A></LI>
  <LI><A HREF="/area2/">Area 2</A></LI>
  <LI><A HREF="/area3/">Area 3</A></LI>

<!--#if expr="AUTHENTICATED_USER.hasRole(_.None,['Area4User'])"-->
  <LI><A HREF="/area4/">Area 4</A></LI>
<!--#/if-->

</UL>

--Rob