Thanks for the suggestions. With a little tweaking, I came up with the behavior I wanted. tal:condition="python:path('hasThePermission') and path('request/date_edited | date_edited | nothing') It does seem that since path has an 'or' operator, it should also have an 'and' operator. Mark
I haven't tested this either, but I think Geir means to use the python: prefix:
tal:condition="python:path('hasThePermission') and path('date_edited | nothing')"
Troy
Geir Bækholt wrote:
Hello Mark, Saturday, October 19, 2002, 11:24:28 PM, you wrote: MG> I can do: MG> tal:condition="exists:date_edited" MG> and I can do: MG> tal:condition="hasThePermision" MG> I can even do: MG> tal:condition="date_edited | hasThePermission"
MG> but how do I do MG> tal:condition="date_edited AND hasThePermission"
MG> Given that date_edited may not exist in the namespace, using python has it's own MG> unique problems. The following errors if date_edited isn't found.
MG> tal:condition="python:hasThePermission and date_edited"
MG> Is there an easy way to do this test in one statement?
the 'path' method available in pythons-statements is your friend in situations like these :
<untested> tal:condition=" path('hasThePermission') and path('date_edited | nothing') </untested>
this just might work.. this one might fail (not give an error, but produce the wrong result) if 'date_edited' exists, but is not true in a pythonian boolean sense.
From how i understand what you are trying to do , this is probably never going to happen anyway... ;)
hope to help :)