[Zope] how to get absolute url from a ZCatalog-brain
Andreas Jung
lists at andreas-jung.com
Tue Oct 25 05:05:57 EDT 2005
--On 25. Oktober 2005 09:56:13 +0100 Peter Bengtsson <peter at fry-it.com>
wrote:
> Without waking up the object you have to use Meta data in the catalog.
> Unless there's some physical path already on the brain object which
> can help you "calculate" the absolute url.
> With waking up the object is done like this:
> brain.getObject().absolute_url()
Guys, you should really RTFM...this is documented in the ZCatalog chapter
of the Zope Book: brain.getURL() is the solution.
brain.getObject().absolute_url() is really the worst solution since you
really load the object from the ZODB.
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051025/40dbb0cd/attachment.bin
More information about the Zope
mailing list