[Zope] How to list subfolders of any folder in DTML?

Michael Fox Michael@CenturySoftware.com.au
Mon, 10 Mar 2003 13:20:26 +1100


Hi *,

I'm having problems with what seems to be an easy task. I have a site =
which looks similar to below...

Folder A
	Folder B
		Folder B1
		Folder B2
		Folder B3
	Folder C
		Folder C1
	Folder D
		Folder D1
		Folder D2

I have a DTML Method in my Folder A named "listSubfolders" which =
contains the following code:

<dtml-in "objectItems(['Folder'])" sort=3D"id" skip_unauthorized>
  <li><a href=3D"&dtml-absolute_url;"><dtml-var title_or_id></a></li>
</dtml-in>

I want the ability to call this object in any one index_html (DTML =
Document) within any one folder, to create some sort of navigation of =
it's subfolders. eg. If I'm looking at index_html in Folder B I would =
see -

o Folder B1
o Folder B2
o Folder B3

So far the only way I can get this to work is change my DTML Documents =
to DTML Methods... which isn't really an option due to an existing =
ZCatalogue amongst other things. If anyone can suggest a work around or =
point me in the right direction it would be appreciated.

Regards,

Michael Fox
Web Analyst Programmer
Century Software
Tel: +61-2-9460-1422=20
Fax: +61-2-9460-3098