[ZPT] Basic syntax question

Peter C. Norton spacey-zope@lenin.nu
Mon, 12 Aug 2002 12:24:47 -0700


What is the syntax for accessing a python method that takes arguments
within a TAL tag?

I'd like to have a simple path-munger that takes 3 arguments:
path/to/object, preserve_path_lvls, and prefix_path.

I want to use it to take a path like

/thumbnails/portfolio1/03

preserve 2 path levels

and insert the path "../../portfolios/" in front of the final 2 path
components to produce the string "../../portfolios/portfolio1/03".

The python to do this is trivial, and I can test that I'm getting the
results that I want, but I'm up against a dead-end trying to figure
out how to pass the correct aruments into the script.

The documentation I've looked at - the zope book and the zpt tutorial
- don't provide me with an understanding of how I would pass in
paramaters for a script to a tal:replace tag.

Is there somewhere in TFM that someone can point me to so I can R it,
or can someone explain in a sentance or two what the syntax is for this?

TIA,

-Peter

-- 
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.