[Zope] sos - help is needed in asap!!!

Tino Wildenhain tino@wildenhain.de
Mon, 05 Nov 2001 12:12:39 +0100


Hi Elena,

--On Monday, November 05, 2001 10:39:46 +0200 Elena Solomou 
<eleni@simplyadvanced.net> wrote:

>
>
> Dear Zope organization,
>
> My name is Eleni and it is my first time that I am writing to you for
> help.  I have registered as a member but I didn't succeded to contact
> with someone.  I am writing to you for giving an answer to my question
> that nobody can give me. Well, I will explain the nature of my problem
> with
> DTML-doc and properties.
> 1.I have created a folder (main).
> 2.Inside in this folder I created another subfolders.
> 3.I have written a code in a dtml-document in main folder
> to give a sortID (string) property in each subfolder.
> 4.Whenever I execute my DTML-DOC code it shows all the values
> of sortIDs that it has assigned in each subfolder.
> 5.I want to take all sortIDs values e.g. sortID=111,
> sortID=112, ...etc to be assigned in the properties of
> main folder in the field of mainNavigationLinks - lines.
> Can you give me possible solutions to my step 5 problem pls???
> Your help will be further appreciated!
>

Usually you would run something like that:

<dtml-in expr="main.objectValues('folder')" sort="sortID">
   <a href="&dtml-absolute_url;"><dtml-var title_or_id></a><br>
</dtml-in>

Hint: you dont need to double the list of links into a property
on your mainfolder.
Hint2: you dont need this extra sortID. Subobjects have a natural order.
Although the ZMI shows them sorted on Id, title, size and so on,
they have the order in which they are added. If you cut&paste
an object into the same folder, it is automatically at the end of the
list.

Regards
Tino Wildenhain