[Zope] Sequence problem

peter be peter@grenna.net
Sun, 6 Aug 2000 18:07:41 +0100


This little DTML code is supposed to be generic for alla folder is the profil folder.

What I want to do is a to have a next folder and previous folder in evey one.

/profil/
    /folder_XHJSD
    /folder_GIEHG
    /folder_OWKD
    /and_many_more
    /....
    /folders_here

    document_html

Document_html is acquired in all folders in the profil folder.
I started doing something like this:
<dtml-in "profil.objectValues(['Folder'])" sort=id>
    <dtml-var id>, 
</dtml-in>
... and this returns: folder_XHJSD, folder_GIEHG, folder_OWKD....

What I want to do is something like this:

<dtml-call "REQUEST.set('thisid',_.string.split(URL,'/')[-2])">
<dtml-in "profil.objectValues(['Folder'])" sort=id>
    <dtml-if "_['id'] == _['thisid']">
        <a href="<dtml-var sequence-previous>">previous</a>
        <a href="<dtml-var sequence-next>">next</a>
    </dtml-if>
</dtml-in>

.... but this returns 
Error Type: KeyError
Error Value: sequence-next
so it is obviuosly the wrong way of doing it.

Grateful for help!