[Zope] Accessing .gif on disk with Python Product?

Martijn Pieters mj@digicool.com
Mon, 7 Aug 2000 22:28:50 +0200


On Mon, Aug 07, 2000 at 04:23:36PM -0400, Evan Simpson wrote:
> From: Martijn Pieters <mj@digicool.com>
> > misc_ is a root level object. Using absolute_url you are acquiring it into
> > your Instance URL, which is not necessary (and will hamper off-server
> > caching). Use &dtml-SCRIPT_NAME; instead (which will give you the absolute
> url
> > of the root object in all cases):
> >
> >   <img src="&dtml-SCRIPT_URL;/misc_/myProduct/chooserIcon" border=0>
> 
> I sugget using "&dtml-BASE1;", since SCRIPT_NAME doesn't work well with
> virtual hosting.

I don't see this would make a difference; Zope is passed the base URL at which
it takes over the URL. A SiteAccess object may only influence parts of the URL
that come _after_ this base.

http://zopeintherooturl/foo, where foo is a Zope object, has SCRIPT_NAME='/',
while http://zopeinasuburl/zope/foo, has SCRIPT_NAME='/zope/'. Zope may remove
the foo from the URL because of some Virtual Host rule, SCRIPT_NAME will still
be valid.

-- 
Martijn Pieters
| Software Engineer            mailto:mj@digicool.com
| Digital Creations          http://www.digicool.com/
| Creators of Zope               http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-----------------------------------------------------