[Zope] dtml parent folder

Small Business Services toolkit at magma.ca
Fri Apr 23 07:20:53 EDT 2004


From: "Ashley Lloyd" <ashleylloyd at hotmail.com>
> I have a folder structure, say, like this
>
> root
>   - pdf
>   - web
>       - pdf
>
> I am in a dtml-method in the web folder, and want to access a python
script
> in the root/pdf folder. I tried initially:
>     <dtml-call "REQUEST.set('varName',pdf.scriptName(args))">
> I get an Attribute Error with value scriptName. (scriptName does not exist
> in the web/pdf folder)

Try:

<dtml-with root>
  <dtml-with pdf>
    <dtml-call "REQUEST.set('varName',scriptName(args))">
  </dtml-with>
</dtml-with>

or

<dtml-with "restrictedTraverse('root/pdf')">
  <dtml-call "REQUEST.set('varName',scriptName(args))">
</dtml-with>


HTH

Jonathan




More information about the Zope mailing list