[Zope] dtml-tree and leaves
Pascal Samuzeau
samuzeau@oreka.com
Tue, 30 Apr 2002 08:33:17 +0100
Hi Dieter,
Thank you for this help. In fact, I did what you told me. I rename
my dtcTemplate.I was waiting for a better a way.
But you're right. I wanted to let the name to be the same, only the
place in the hierarchy should be different.
But, as you said, there is no leaves_expr.
Maybe it will be necessary to do one, in the future.
Kindly
PS
-------------------
> Pascal Samuzeau writes:
> > I want to use of dtml-tree to get what there is in a folder and
> > subfolders, with a method pass in leaves.
> >
> > For this I've this architecture :
> >
> > !-Root
> > !-------+Folder A
> > !-----------+Folder B
> > !-----------+Folder C
> > !-------+Folder D
> > !-----------+Folder E
> > !-----------------index
> > !-----------------dtcontent
> > !-----------------dtcTemplate
> > !----index
> > !----dtcontent
> > !----dtcTemplate
> >
> > When I try to do
> >
> > Root/Folder D/FolderE/index, with code in index as :
> >
> > <dtml-tree PARENTS[-1].Folder A branches="objectValues"
> > leaves="dtcTemplate">
> >
> > I got the content with the template of Root/dtcTemplate.
> > So, How can I write to tell to leaves to get the dtcTemplate in
> > Folder E ?
> The "leaves" method is resolved relative to the currently
rendered
> tree item. This means for items outside "E" you will get
> "/dtcTemplate".
>
> I am not sure, whether there is a "leaves_expr" attribute
> (I do not think so). It might help you.
>
> An sure work around would be to rename one of your
"dtcTemplates".
> But, probably, you have a reason that the are named equally...
>
>
> Dieter
>
--------------------------------------------------
Oreka ! Nous sommes l'internet moins cher !
Surfez 25% moins cher avec http://www.oreka.com