[Zope] Another Zope question
mindlace
mindlace@imeme.net
Mon, 08 May 2000 11:15:39 -0600
Kevin Dangoor wrote:
>
> ----- Original Message -----
> From: "Nolan Darilek" <nolan_d@bigfoot.com>
> To: <zope@zope.org>
> Sent: Friday, May 05, 2000 9:35 PM
> Subject: [Zope] Another Zope question
>
> > And the (very broken and silly :) snippet of code is:
> > <dtml-in menuitems>
> > <dtml-if sequence-even>
> > <a href="<dtml-var "_['sequence-item'].absolute_url()">">
> > <dtml-else>
> > <dtml-var sequence-item></a><br>
> > </dtml-if>
> > </dtml-in>
> >
> > So, of course, I'm calling absolute_url() on a string, when I'd like
> > to be calling it on an object. The sequence-item is always an object
> > ID when the index is even, so what I'd like is code which returns an
> > object when passed its ID; something which assumes that the ID is
> > either in the current folder, or is being acquired. So, something
> > like:
I think you should use getitem, like so (untested):
<a href="<dtml-var "_.getitem('sequence-item').absolute_url()">">
--
ethan mindlace fremen mindlace@imeme.net
zope -&- imap email -&- mailing list
weave your web with the web at http://imeme.net