On 9 Nov 1999, Arjan Scherpenisse wrote:
On the other hand, if index_html is a DTML Document then you would have to change the reference to the Folder to:
<!--#var "PARENTS[0].title_and_id"-->
For some obscure reason, this doesnt work. I only get a empty string returned.
If you look at the source of the document, you will see it is returning something - a reference to a function object. Its just that it is in angle brackets so your browser thinks it is a HTML tag. The example should read <!--#var "PARENTS[0].title_and_id()"-->, which actually calls the title_and_id method
Another question: When i am in some subfolder a/b/c of folder News, which is a direct descendant of the root folder, how do i get the id of this 'News' folder?
<dtml-with "PARENTS[3]"> <dtml-var id> </dtml-with> Or if you know the id of the News folder ('News'?), then you can try: <dtml-with News> <dtml-var id> </dtml-with> This example finds the object with id 'News' via aquisition (so it can be any number of folders up, provided there are no other objects in the aquisition path with the same id). ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen