[Zope] the tree tag is driving this newbie up the wall

Walter A. Aprile walter@ilce.edu.mx
Tue, 27 Jun 2000 21:14:12 -0500 (CDT)


Hello,
	I am trying to write a tree access to a hyerarchy of folders
containing custom objects, subclassed from the DTML Docuement. The 
inheritance path should be
 DTMLDocument -> Article (my custom class) -> every single article in the folders.

	I would like only Articles and folders to appear in the tree, so
this is what I do:

<dtml-tree branches_expr="objectValues(['Folder','Article'])">
	<dtml-if "meta_type=='Folder'">
		<dtml-var title_or_id>
	<dtml-else>
		<A HREF="<dtml-var tree-item-url>"><dtml-var title_or_id></A>
	</dtml-if>
</dtml-tree>

The tree *looks* all right, and the folders expand and contract ok. But
the URLs in the HREF are mangled. For example, I have a folder called
abracadabra, that contains another folder named curiosidades, that
contains an article whose title is "las origines del ajedrez", and
that has in id of "ajedrez". The link comes out like this:

<A HREF="abracadabra/curiosidades/<string>">las origines del ajedrez</A>

I hope this does not play hell with the guys that use HTML-aware mail
clients, but what happens is that instead the URL instead of being
bracadabra/curiosidades/ajedrez gets the last component of the path
substituted with 'string' between angle brackets.

If I modify the dtml-tree tag so that it takes in also DTML Documents,
*those* URLs work. So what is happening ? Shouldn't the id propery
be inherited from my Article class ?

It *almost* works, and it is driving me insane. 

Thanks in advance,
			Walter


-- Vita brevis, ars longa, occasio celeris, experimentum periculosum,
judicium difficile. Attention: Un train peut en cacher un autre
-><- Eris aprueba este email ! -><- http://redescolar.ilce.edu.mx