[Zope-CMF] folder listing as a menu

Jens Hauser Jens Hauser" <hauser@jam-gmbh.de
Tue, 05 Feb 2002 18:29:43 +0100


Hi all,

I think it's a very easy thing to do but I can't find a solution (please apologize for my question):

I'm using Zope with the Zope-CMF on a linux system. I have the following folders within one portal:

portal
|--->folder 1
   |--->document1
   |--->document2
|--->folder2
   |--->document3
   |--->document4
   |--->document5
|--->folder3
   |--->document6
   |--->folder4
      |--->document7
|--->folder5
   |--->document8

and so on.

I'm trying to setup a left hand menu which shows all available subfolders and documents of the same level based on the actual folder. So if someone enters the portal he will see only the following:

folder1
folder2
folder3
folder5

If the user clicks on folder 3 he should see:

folder 3
  document6
  folder4

and so on.

For this left hand menu I created a file called "menu-left" which is located within the folder "custom" under "portal_skins". An appropriate "standard_html_header" file is calling this menu for every 
folder I "open" or every document I view. So far so good.

My problem is, that it's only working this way if I hardcode the foldername within the file "menu-left" and put it into the folder where I want to get the listing from and not as described into custom 
folder of the portal-skins ...
So my question is: How can I reference the "calling" document within the dtml-with statement so that the links of the actual directory/folder will show up... (Can I use aq_parent and how can I use it 
within a dtml-document?)

I hope someone understands my problem because of my "bad" English. Below you can find a code snippet of menu-left:

#### menu-left ##########
<ul class="menulist">
<dtml-with "folder3">
<span class="infoimportantongreen">
    <dtml-in expr="objectValues( [ 'Document', 'Folder', 'Portal Folder' ] )" 
      sort=title skip_unauthorized>
      <dtml-if expr="id <> 'img'">
        <li><a class="linkongreen" href="&dtml-id;"> <dtml-var Title> </a><br>
      </dtml-if>
    </dtml-in>
</span>
</ul>
#####################

Best regards,
Jens