What's the tal expression to test for whether someone is logged in?
In other words, what should I substitute for X in the following to make this division appear only when a user is logged in? : <div tal:condition="X"> . </div> ~ TIA ~ Ken
+-------[ Ken Winter ]---------------------- | In other words, what should I substitute for X in the following to make this | division appear only when a user is logged in? : | | | | <div tal:condition=?X?> ? </div> tal:condition="python: user.has_role(['Authenticated'],)" -- Andrew Milton akm@theinternet.com.au
Andrew ~ Yes!! It worked. One more question: Where (if anywhere) could I have looked up this answer (and probably many more), so I wouldn't have to bother this list with questions like this? ~ Ken
-----Original Message----- From: Andrew Milton [mailto:akm@theinternet.com.au] Sent: Sunday, April 01, 2007 1:58 AM To: Ken Winter Cc: Zope List Subject: Re: [Zope] What's the tal expression to test for whether someone is logged in?
+-------[ Ken Winter ]---------------------- | In other words, what should I substitute for X in the following to make this | division appear only when a user is logged in? : | | | | <div tal:condition=?X?> ? </div>
tal:condition="python: user.has_role(['Authenticated'],)"
-- Andrew Milton akm@theinternet.com.au
Ken Winter schrieb:
Andrew ~
Yes!! It worked.
One more question: Where (if anywhere) could I have looked up this answer (and probably many more), so I wouldn't have to bother this list with questions like this?
Its in the general Zope API and in the ZPT documenation regarding the name spaces you use. Both are in the Zope-Book which is online: http://www.plope.com/Books/2_7Edition Also an older version directly at zope.org. Regards Tino
participants (3)
-
Andrew Milton -
Ken Winter -
Tino Wildenhain