RE: [Zope] using a method as the img name
Hi Trevor; I find the easiest way to do this is to use relative URLs on your Zope server, using <img src="images/header.gif"> instead of the absolute path. (This way you can reference it from almost anywhere in your site and let acquisition do the work for you). Jeff
-----Original Message----- From: Trevor Toenjes [SMTP:zope@toenjes.com] Sent: Sunday, October 28, 2001 3:03 PM To: zope@zope.org Subject: [Zope] using a method as the img name
I created a method/document called header.gif that will be called from a remote, non-zope server.
just calling the URL http://zope/images/header.gif renders the Method and variable image correctly. However, including <img src="http://zope/images/header.gif"> in the remote HTML page does not. Why doesnt this just act like a Zope object and render the img? What is the solution?
TIA, Trevor
_______________________________________________ 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 )
I find the easiest way to do this is to use relative URLs on your Zope server, using <img src="images/header.gif"> instead of the absolute path. (This way you can reference it from almost anywhere in your site and let acquisition do the work for you).
But this plays hell with caching, as the user's browser will have to request separately : /site/images/header.gif /site/images/folder1/header.gif /site/images/folder2/header.gif /site/images/folder2/sub1/header.gif /site/images/folder3/header.gif ... It's best to anchor all thoses images somewhere. -- Florent -- Florent Guillaume, Nuxeo SARL (Paris, France) +33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com
Hmmm... when I do this, the URL shows up as absolute in the bottom of the browser - don't they 'convert' them before referencing?
From: Florent Guillaume <fg@nuxeo.com> Organization: Nuxeo Newsgroups: local.lists.zope.zope Date: 2 Nov 2001 23:21:52 GMT To: zope@zope.org Subject: Re: [Zope] using a method as the img name
I find the easiest way to do this is to use relative URLs on your Zope server, using <img src="images/header.gif"> instead of the absolute path. (This way you can reference it from almost anywhere in your site and let acquisition do the work for you).
But this plays hell with caching, as the user's browser will have to request separately :
/site/images/header.gif /site/images/folder1/header.gif /site/images/folder2/header.gif /site/images/folder2/sub1/header.gif /site/images/folder3/header.gif ...
It's best to anchor all thoses images somewhere.
-- Florent
-- Florent Guillaume, Nuxeo SARL (Paris, France) +33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com
_______________________________________________ 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 )
Well yes, the relative URLs you use have an absolute equivalent computed by the browser based on the current page (or <base> tag). And it's this absolute version it usually displays at the bottom. But what I'm saying is still true: even though Zope is able to find the images through acquisition, the browser will think them all different because they have different absolute URLs. -- Florent marc lindahl <marc@bowery.com> wrote:
Hmmm... when I do this, the URL shows up as absolute in the bottom of the browser - don't they 'convert' them before referencing? -- Florent Guillaume, Nuxeo SARL (Paris, France) +33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com
From: Florent Guillaume <fg@nuxeo.com>
But what I'm saying is still true: even though Zope is able to find the images through acquisition, the browser will think them all different because they have different absolute URLs.
I see what you're saying, yes that's right.
participants (3)
-
Florent Guillaume -
Jeffrey Robinson -
marc lindahl