[Zope-CMF] Disable ActionBox for guest?
Tres Seaver
tseaver@digicool.com
Tue, 03 Apr 2001 22:22:23 -0400
Jason Wehmhoener wrote:
>
> I want to force all members to login by typing in the login_form
> url, and I don't want an ActionBox to show for anonymous/guest
> users. What do I need to modify?
>
In your portal, navigate to 'portal_skins.generic.actions_box'. Note
that the first line is:
<dtml-let isAnon="portal_membership.isAnonymousUser()"
which makes the variable 'isAnon' available throughout the scope of
the '<dtml-let>' tag.
Now, click the "Customize" button, which creates a DTMLMethod in your
'custom' skin folder. Immediately after the '<dtml-let...>', add:
<dtml-unless isAnon>
and then, just before '</dtml-let>' at the bottom:
</dtml-unless>
The whole actions box will just disappear for anonymous users at
that point.
P.S. Do you *really* mean that you want to make them *type* in
the URL box to log in?
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org