[Zope] Name of top level folder
Alex.Thomas@dresdnerkb.com
Alex.Thomas@dresdnerkb.com
Fri, 11 Jun 1999 02:30:37 +0100
Ah, brilliant - the expr keyword comes to the rescue. Many thanks, don't
think I would have found that for a long time.
As I'm now indebted to you and the list, I might make the very modest
contribution of the DTML that makes the multiline tree headings line up
neatly. Well, it's a start...
cheers
alex
-----Original Message-----
From: Alexander Staubo [mailto:alex@mop.no]
Sent: 11 June 1999 02:49
To: Zope Mailing List (E-mail)
Subject: RE: [Zope] Name of top level folder
You might be confusing "name" with "id" or "title". You're right, the
root object does not have a name, but that should stop you from
including it in iterations, or the tree tag.
To tell the #tree tag to start at the top, do:
<!--#tree expr="PARENTS[-1]"-->
<!--#var title_or_id-->
<!--#/tree-->
Note that, for obvious reasons, the top level will not be included in
the tree. (If you're wondering how the hierarchical tree seen in the
Zope management screens manages to include the root object, this isn't a
trick performed just with the #tree tag. See
zope/lib/python/Ap/menu.dtml for the DTML code.)
--
Alexander Staubo http://www.mop.no/~alex/
"`Ford, you're turning into a penguin. Stop it.'"
--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
>-----Original Message-----
>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
>Alex.Thomas@dresdnerkb.com
>Sent: 11. juni 1999 02:34
>To: zope@zope.org
>Subject: RE: [Zope] Name of top level folder
>
>
>If I have a document http:/mysite/index_html then if that
>document calls
>#tree I think PARENTS[0] would be the name of the top level
>folder. However,
>I can't use it (or PARENTS[-1] etc.) - raises a KeyError - so
>I suspect that
>there is no name for this folder, which is a bit of a shame...
>
>alex
>
>-----Original Message-----
>From: Alexander Staubo [mailto:alex@mop.no]
>Sent: 11 June 1999 01:33
>To: Zope Mailing List (E-mail)
>Subject: RE: [Zope] Name of top level folder
>
>
>PARENTS[-1] will get you the top-level folder object, if that's what
>you're asking.
>
>--
>Alexander Staubo http://www.mop.no/~alex/
>"`Ford, you're turning into a penguin. Stop it.'"
>--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
>
>>-----Original Message-----
>>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
>>Alex.Thomas@dresdnerkb.com
>>Sent: 10. juni 1999 23:36
>>To: zope@zope.org
>>Subject: [Zope] Name of top level folder
>>
>>
>>OK, an easy one - what's the Name of the top level folder? I
>>need it to pass
>>to the #tree tag so it displays the whole structure.
>>
>>Thanks!
>>
>>alex
##########################################
This email, its content and any files transmitted with it are intended
solely for the addressee(s) and may be legally privileged and/or
confidential. Access by any other party is unauthorised without the
express written permission of the sender. If you have received this
email in error you may not copy or use the contents, attachments or
information in any way. Please destroy it and contact the sender on
the number printed above, via the Dresdner Kleinwort Benson
switchboard on +44 171 623 8000 or via e-mail return. Internet
communications are not secure unless protected using strong
cryptography. This email has been prepared using information believed
by the author to be reliable and accurate, but Dresdner Kleinwort
Benson makes no warranty as to accuracy or completeness. In particular
Dresdner Kleinwort Benson does not accept responsibility for changes
made to this email after it was sent. Any opinions expressed in this
document are those of the author and do not necessarily reflect the
opinions of the Bank or its affiliates. They may be subject to change
without notice.
##########################################