[Zope] Passing arguments to a ZPT
Johan Carlsson [EasyPublisher]
johanc@easypublisher.com
Sat, 22 Mar 2003 10:56:09 +0000
Hi,
I'm trying to use a centralized ZTP which could be called from other
tempate/methods.
I want to pass arguments to the ZTP to be able to customized it.
Short version: How do I access keyword arguments passed to a ZPT?
Traditionally (I'm accually converting a DTML Method template to ZPT) I
either passed the as keyword arguments <dtml-var "''printview(_.None,_,
key1=value1, ...)">
or pushed the on top of the namespace: <dtml-let key1="value1"
...><dtml-var "''printview(_.None,_)"></dtml-let>
Now I'm trying to do the same thing:
<dtml-var "_.getitem(''printview.pt")(key1=value1, ...)">
or
<dtml-let key1="value1" ...><dtml-var printview.pt></dtml-let>
but the passed arguments can't be accessed in the ZPT:
<p tal:content="key1">Key1</p>
or
<p tal:content="here/key1">Key1</p>
or
<p tal:content="request/key1">Key1</p>
or (definitely not)
<p tal:content="namespace/key1">Key1</p>
Is there a way to do this?
Regards,
Johan Carlsson
--
Easy Publisher Developers Team
Johan Carlsson
johanc@easypublisher.com
Mail:
Birkagatan 9
SE-113 36 Stockholm
Sweden
Phone +46-(0)8-32 31 23
Fax +46-(0)8-32 31 83
Mobil +46-(0)70-558 25 24
http://www.easypublisher.com