[Zope] expression in a tree tag?

Guy Davis davis@arc.ab.ca
Tue, 11 Jan 2000 15:56:32 -0700


Sorry to keep bothering everyone with my numerous questions.  Here's the
latest...

Given a URL like this:
http://servername/Projects/ProjectName/Path/To/Document
I can use <dtml-var "_.string.split(URL0,'/')[4]">
to get the name of the project.  However, on pages in the ProjectName
folder, I am using a tree to show the docs available.

If my tree tag is:
<dtml-tree expr="ProjectName" ...
everything works.  I want this code to work for multiple projects
however so I tried:

<dtml-tree expr="_.string.split(URL0,'/')[4]" ...
but this doesn't seem to actually evaluate the method call as I got a
name error for _.  How can I have the dtml-tree tag evaluate that
expression and get 'ProjectName'?  Thanks again.

-- 
       Guy Davis    mailto:davis@arc.ab.ca
  (403) 210-5334    Alberta Research Council