[Zope] using 'tree' from a 'lines' property.

Tony McDonald tony.mcdonald@ncl.ac.uk
Thu, 1 Apr 1999 10:41:09 +0100


Hi all,
I'd like to be able to use #tree to create a table of contents of the 
following form, but as I'm not massively familiar with #trees yet, 
I'd like to know what I'm letting myself in for...

If I have a property, type 'lines', called ToC which is like

Guide, 1, 101
Cell Biology, 1, 102
Introduction, 2, 216
Item 1, 3, 301
Item 2, 3, 330
...
Topic #1, 2, 400

(ie each line is composed of a description, the 'level' at which the 
description should occur, and a unique identifier for that 
description)

can I use DTML to create a #tree structure of the following form;

Guide
Cell Biology
	Introduction
		Item 1
		item 2
		...
		item n
	Overview
		item 1
		..
		item n
	Topic #1
	...

where each line above is a URL (something like<a href= 
http://host/get_items/400/disp_items>Topic #1</a>)
or do I need to start writing an external method?

any thoughts appreciated.
tone
------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2