[Zope] CoreSessionTracking's get looped in <dtml-in> does not work?

Milos Prudek prudek@nembv.cz
Tue, 7 Aug 2001 09:02:50 +0200


Dne pond=ECl=ED 06 srpen 2001 15:32 jste napsal(a):
> How about:
>
> <dtml-let "a=3Ddata.get('writers')">
>   <dtml-var "display(a)">
> </dtml-let>
>
> Where display is:
>
> display (Python Script)
> arguments: data
>
> return data.get('fname')

I can't test it now... I'm at Zope 2.4 machine, and CoreSessionTracking 0=
.8=20
doesn't work with it.=20

It looks good but I need to iterate using <dtml-in>...  because I need a=20
construct "<dtml-unless sequence-end>, </dtml-unless>"

What you wrote does not look like iteration. The a variable receives a se=
t of=20
records... display Script is called with "a" parameter... fname is extrac=
ted=20
from session data... but which fname, if there are many records? And what=
 you=20
wrote is a nested session extraction?? (first extract writers, then=20
sub-extract fname?)=20

You are right that when I pass the :records as a parameter I can iterate=20
through it. However I cannot change values inside :records... unless I ap=
ply=20
the patch suggested recently by Evan Simpson. If I do not want to patch, =
I=20
need to convert :records into a list of tuples, and use it instead of=20
records. Right?


--=20
Milos Prudek