hi All: What does this translate to in ZPT: <dtml-if name="user_can_edit"> Perhaps here/user_can_edit or python:here.user_can_edit? Both don't seem to work. J.
On Tue, Jun 01, 2004 at 04:58:53PM -0700, Jason C. Leach wrote:
hi All:
What does this translate to in ZPT: <dtml-if name="user_can_edit"> Perhaps here/user_can_edit or python:here.user_can_edit? Both don't seem to work.
"don't seem to work" is vague. What error do you get? The solution depends on where user_can_edit is found... Is it set with a <dtml-let> elsewhere in the original dtml? if so, then you don't need the "here" prefix. Does it come from the request? If so, then you want request/user_can_edit. -- Paul Winkler http://www.slinkp.com
Paul Winkler wrote:
Is it set with a <dtml-let> elsewhere in the original dtml? if so, then you don't need the "here" prefix.
Does it come from the request? If so, then you want request/user_can_edit.
Is it a method or a Python Script somewhere? Then you want "python:here.user_can_edit()" (note the brackets, to call the method). But I doubt that it is, otherwise "here/user_can_edit" should also have worked. -- Jean Jordaan http://www.upfrontsystems.co.za
Jason C. Leach wrote:
hi All:
What does this translate to in ZPT: <dtml-if name="user_can_edit"> Perhaps here/user_can_edit or python:here.user_can_edit? Both don't seem to work.
<some_html_element tal:condition="here/user_can_edit"> Only show if user can edit. </some_html_element> ...but read what Paul said too... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (4)
-
Chris Withers -
Jason C. Leach -
Jean Jordaan -
Paul Winkler