Re: [Zope] Re: Passing arguments to a ZPT
To: Maik Jablonski <maik.jablonski@uni-bielefeld.de> Subject: Re: [Zope] Re: Passing arguments to a ZPT At 12:09 2003-03-22 +0100, Maik Jablonski said:
Johan Carlsson [EasyPublisher] wrote:
Short version: How do I access keyword arguments passed to a ZPT?
Have a look at "options" as access-point to keyword-arguments... Taken from the ZopeBook (http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx):
Ah, thanks. It was right under my nose (now that I know what I was looking for). (It solves the keyword part but not the namespace argument passing that I also uses.) Now, next questions. I still have allot of DTML methods that uses variables in the namespace (by passing _.None,_) Calling these from ZPT breaks the namespace. (How) could I send the current namespace to the DTML sub-methods? Cheers, 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
Johan Carlsson [EasyPublisher] wrote:
I still have allot of DTML methods that uses variables in the namespace (by passing _.None,_) Calling these from ZPT breaks the namespace.
(How) could I send the current namespace to the DTML sub-methods?
You should be able to just pass "here" instead of context or this(). A "full" example of what can be passed should look like this: <span tal:replace="python:here.dtml_method(here, request, title_or_id='Another title')"></span> Untested from zpt, but that is how it normally looks. regards Max M
participants (2)
-
Johan Carlsson [EasyPublisher] -
Max M