[Zope] dtml-tree
Pierre-Julien Grizel
grizel@mouli.net
Tue, 06 Mar 2001 16:04:56 +0100
> nuno wrote:
>
> Hi all !!
> I'm trying to use the dtml-tree tag for displaying my folder site structure !
> The problem is that i want to display only a part of my site structure, so
> i have tried something like this:
>
> <dtml-with "PARENTS[0].SITE.DIR1.DIR2"> -> Path from where i want to show the
> structure
> <dtml-var browse> -> the DTML-method that does the display of the tree
> </dtml-with>
>
> the funny thing is that, if i do a view in zope of the DTML-method browse
> directly it works, but it
> fails when i call the method from other place.
>
> Has anyone had a similar problem ?
>
> thanks for all effort, and best regards
>
> Nuno
You should instead put everything in your 'browse' method specifying the object
you wanna start with _inside_ the <dtml-tree> tag, like this :
<dtml-tree expr="SITE.DIR1.DIR2">
...
</dtml-tree>
It's better doing this to explicitly pass the <dtml-tree> tag the object you
want to 'scan'.
Regards,
P.-J.
--
If the only tool you have is a hammer,
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau,
vous avez tendance à voir chaque problème comme un clou.
--Abraham Maslow