[Zope-CMF] plone: portal_actions conditions
Tres Seaver
tseaver@zope.com
09 Jul 2002 13:08:59 -0400
On Tue, 2002-07-09 at 13:00, Jan Ulrich Hasecke wrote:
> I would like to add a global tab called "english version" or "german
> version" into my plone-site. I am sure I can insert a condition like
> this:
>
> If Language=german display "english version"
> If Language=english display "german version"
>
> What do I have to insert into the field "Condition" in portal_actions
> (Actions) to aquire this?
The Condition field is a TALES expression which has the following
"top-level" names available to it:
object_url -- full URL of the current object
folder_url -- full URL of the current folder
portal_url -- full URL of the CMF Site
object -- reference to the current object
folder -- reference to the current folder
portal -- reference to the CMF Site
nothing -- Python's 'None'
request -- the REQUEST object
modules -- "safe" module importer (a mapping)
member -- the current authenticated member
So, in your case, you could use:
python: request.get( 'Language', 'de' ) == 'en'
or::
python: request.get( 'Language', 'de' ) == 'de'
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com