[Zope] ZPT and traverse_subpath (Python Script)

Andreas Elvers elvers@work.de
Fri, 22 Feb 2002 17:16:23 +0100


Hi,

is it possible to use traverse_subpath inside a python script,
that is called by a ZPT ?

I tried the following simple test. I call a PScript from a ZPT some
extra path info. I expect the ZPT to replace "to be replaced" with a list 
containing the remaining path elements. But it's not working. Is this a bug or a 
feature ? :-)

Viele Gruesse
- Andreas

====
ZPT:
====

<html>
   <body>

     <p tal:content="here/pscript/ja/ja/deine/mutter">
        to be replaced
     </p>


   </body>
</html>

=============
PythonScript:
=============

## Script (Python) "pscript"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
# Example code:

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

# Return a string identifying this script.

return traverse_subpath


-- 
___________________________________________________________________________
Andreas Elvers                  |  n@work Internet Informationssysteme GmbH
Email:          andreas@work.de |
Tel./Fax:    040/23 88 09-00/29 |                     w w w . w o r k . d e