[Zope] <dtml-with> Question
Kevin Dangoor
kid@kendermedia.com
Sun, 10 Oct 1999 15:37:28 -0400
-----Original Message-----
From: Sascha Matzke <sascha@bespin.de>
To: Kevin Dangoor <kid@kendermedia.com>
Cc: zope@zope.org <zope@zope.org>
Date: Sunday, October 10, 1999 2:29 PM
Subject: Re: [Zope] <dtml-with> Question
>Hallo,
>
>On Sun, Oct 10, 1999 at 02:16:12PM -0400, Kevin Dangoor wrote:
>> It sounds like you're basically trying to do a namespace lookup.
>>
>> <dtml-with "_[objA]">
>> should do what you want.
>
>It doesn't...
>
>I have an variable named item with the value "Desk.Test.index_html".
Aha. That is more complex.
I don't know if this is the BEST way to do what you want, but you could do:
<dtml-call "REQUEST.set('objnames', _.string.split(item, '.'))">
<dtml-with "_[objnames[0]]">
<dtml-with "_[objnames[1]]">
<dtml-with "_[objnames[2]]">
...your other stuff...
</dtml-with>
</dtml-with>
</dtml-with>
Kevin