[ZPT] fixed url, or how to find python script

Dieter Maurer dieter@handshake.de
Thu, 11 Apr 2002 21:51:14 +0200


Call Me Audrey writes:
 > how to make a fixed url (like for a constant-but-modular header) using zpt 
 > and macros? or, how to reference the python script that contains the fixed 
 > url? i tried:
 > 
 > <div metal:fill-slot="header">
 > <td tal:repeat="item python:base_href_py/container/objectValues"
 > height="26" align="center"><a href="" tal:attributes="href item">
I think, you made 2 errors:

  *  "/" is the access operator in "path:" Tales expressions.
     In "python:" Tales expressions, it is "." (or [...], depending
     on object type).

  *  all paths in ZPT must start with a defined variable.
     At the start, there are only the predefined variables
     "here", "container", "request", "user", ....


Dieter