[Zope] DTML Namespace confusion
Kevin Dangoor
kid@kendermedia.com
Sat, 23 Oct 1999 12:27:28 -0400
-----Original Message-----
From: Abigail Montero <abimontero@apexmail.com>
To: zope@zope.org <zope@zope.org>
Date: Friday, October 22, 1999 9:24 PM
Subject: [Zope] DTML Namespace confusion
>But what I would really like to do is this:
>
> <dtml-if "some_condition">
> <dtml-var "render_item(_,_.None,REQUEST,input_var1='value1')">
> <dtml-else>
> <dtml-var "render_item(_,_.None,REQUEST,input_var1='value2')">
> </dtml-if>
You're very close. Michel Pelletier wrote a message a few weeks back that
explained things nicely. Basically, the first parameter is the "target"
object (not sure if that's the right word), and the second parameter is the
namespace.
<dtml-if "some_condition">
<dtml-var "render_item(_.None, _, input_var1='value1')">
<dtml-else>
<dtml-var "render_item(_.None, _, input_var1='value2')">
</dtml-if>
Should do what you're looking for. Note that you don't need to pass REQUEST
in, because it is a part of the namespace.
Kevin