[Zope] aquistion probleme

Lennart Regebro regebro at gmail.com
Fri Sep 16 10:34:43 EDT 2005


On 9/16/05, chetzacoalt <chetzacoalt at free.fr> wrote:
> 
> 
> hello
> 
> I'm trying an acquisition, but I must be doing something wrong...
> 
> I've got a setting like this :
> 
> /dir1/dir2_1/dir3_1
> /dir1/dir2_2/dir3_2
> /dir1/dir2_2/img.jpg
> /img.jpg
> 
> I write somthing like :
>  context['img.jpg'].absolute_url()
> 
> I expect to get /dir1/img.jpg, in all cases but when the script
> runs from /dir1/dir2_2/ and /dir1/dir2_2/dir3_2
> 
> unfortunately, that's not what happends...

No, the absolute_url() will reflect how you are getting the image.
context['img.jpg'].aq_inner.absolute_url() may do what you expect.

> may someone help me ?

Sure. What's the problem? :)

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the Zope mailing list