[Zope] nested dtml-with
Paz
paz@chello.nl
Wed, 12 Jun 2002 22:55:38 +0200
The keyerror is folder2. But how are they different? The outcome is that
a document is rendered as:
folder1.index_html
folder1.folder2.index_html
Or isn't it?
Paz
-----Original Message-----
From: Peter Sabaini [mailto:sabaini@inode.at]
Sent: Wednesday, June 12, 2002 10:51 PM
To: Paz
Cc: zope@zope.org
Subject: Re: [Zope] nested dtml-with
Hi,
are those two snippets supposed to be equivalent? Because I dont think
they are -- the second one doesn't nest like the first one
Depending on where those snippets live that might be the cause of the
keyerror
cheers, peter.
On Wed, 12 Jun 2002, Paz wrote:
> Greetings all,
>
> I have two snippets of code, the later I wish would work. Can anyone
> point out why?
>
> The structure:
> /
> folder1 /
> index_html
> folder2 /
> index_html
>
> This works:
>
> <dtml-with folder1>
> <dtml-var index_html>
> <dtml-with folder2>
> <dtml-var index_html>
> </dtml-with>
> </dtml-with>
>
> This doesn't:
> <dtml-in "['folder1', 'folder2']">
> <dtml-with "_.getitem(_['sequence-item'])">
> <dtml-var index_html>
> </dtml-with>
> </dtml-in>
>
> I'd like the second to work. If I inject that with a try/except I find
> the first iteration works, but the second raises a key error. Can
> someone help?
>
> Thanks as always,
> Paz
>
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>