[Zope] base href

Ian Bicking ianb at colorstudy.com
Tue Nov 25 13:33:27 EST 2003


I'm having a problem with LocalFS, HTML files, and the <base href> that 
gets added to pages.  But I feel, at its source, Zope is just being 
nuts.

HTTPResponse.insertBase inserts <base href> to pages; in turn, this 
base is set in HTTPResponse.setBase, where it ensures that the base 
always ends in "/".  This causes paths to grow, as leaf pages 
(non-directory pages) get treated like directories.  This is annoying 
in normal Zope objects, but LocalFS objects don't seem to acquire 
parents, so the extra elements in the URL that point to a LocalFS are 
just broken.

While these growing URLs seem to be a persistent problem for many 
people in Zope, I assume there is a way that the paths *should* work.  
What do people do to get rid of these?  Is there a way to keep 
HTTPResponse from adding a <base href> at all?  (I could add "<!-- 
<base> -->" to pages to trick insertBase into thinking the tag has 
already been added, but that's obviously a bad hack)

--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org




More information about the Zope mailing list