What I'd like to do is something like: <dtml-in objectValues> <dtml-var "_['sequence-item'].absolute_url()"><BR> </dtml-in> But this seems to try to render each object, rather than just executing absolute_url on it. Anyone know why? Anyone know how I should be doing this? cheers, Chris
Chris Withers wrote:
What I'd like to do is something like:
<dtml-in objectValues> <dtml-var "_['sequence-item'].absolute_url()"><BR> </dtml-in>
But this seems to try to render each object, rather than just executing absolute_url on it.
Anyone know why?
Anyone know how I should be doing this?
what about (not tested, but should work): <dtml-in objectValues> <dtml-var absolute_url> </dtml-in> the dtml-in changes the namespace to the sequence-item automatically, so the absolute_url is that of the current sequence-item. Rik
Thanks Rik, It worked, What I'd like to know is why what I had before didn't work :S cheers, Chris
Chris Withers wrote:
Thanks Rik,
It worked,
What I'd like to know is why what I had before didn't work :S
Probably the _['sequence-item'] gets you a 'rendered' version of the sequence-item. If you want the raw object, you'd probably have to use _.getitem(_['sequence-item']) Yegh Rik
Why don't you use <dtml-var url> ? Tom. At 16:00 19/04/2000 +0100, Chris Withers wrote:
What I'd like to do is something like:
<dtml-in objectValues> <dtml-var "_['sequence-item'].absolute_url()"><BR> </dtml-in>
But this seems to try to render each object, rather than just executing absolute_url on it.
Anyone know why?
Anyone know how I should be doing this?
cheers,
Chris
_______________________________________________ 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 )
Chris Withers wrote:
Why don't you use <dtml-var url> ?
Where is that documented?
http://www.zope.org/Members/jim/ObjectURLs
Does it return absolute or relative URLs?
absolute. you can add an integer to have n less objects at the end of the URL. BASE does the same thing, only the other way around. hope that helps, -- ethan mindlace fremen mindlace@imeme.net zope -&- imap email -&- mailing list weave your web with the web at http://imeme.net
participants (4)
-
Chris Withers -
mindlace -
Rik Hoekstra -
Tom Deprez