Hello. Is there a simple way I can get access to the id/title of the folder that my DTML document is in? I have done this before but don't recall how. Essentially, I am trying to access the id/title of the parent(i.e. folder) in which my index_html resides. One way is to use the PARENTS variable. Is there a simpler way which would give me access to only the parent object and not all the parents up to the root. Any help would be greatly appreciated. Thanks. - Asad
Asad Habib wrote:
Hello. Is there a simple way I can get access to the id/title of the folder that my DTML document is in? I have done this before but don't recall how. Essentially, I am trying to access the id/title of the parent(i.e. folder) in which my index_html resides. One way is to use the PARENTS variable. Is there a simpler way which would give me access to only the parent object and not all the parents up to the root. Any help would be greatly appreciated. Thanks.
You can use: <dtml-var "aq_parent.title_or_id()"> Cheers, Maik
Asad Habib wrote at 2004-4-28 10:38 -0400:
Hello. Is there a simple way I can get access to the id/title of the folder that my DTML document is in?
If this really is a "DTML Document" and you want to access the container that contains this document (and you are using Zope 2.7 or above), then you can use "aq_inner.aq_parent". This should give you the container containing the "DTML Document". This will not work for a "DTML Method". -- Dieter
participants (3)
-
Asad Habib -
Dieter Maurer -
Maik Jablonski