[Zope3-dev] base tag
Jim Fulton
jim@zope.com
Fri, 15 Feb 2002 08:26:12 -0500
Steve Alexander wrote:
>
> I've been looking at Zope/Publisher/BaseRequest.py, specifically at the
> handling of the base tag, at around line 296.
>
> I've also noticed that in Zope/App/ZMI/ZMIViewUtility.py, tabs are given
> links starting with "../".
This is because Most pages are sub-pages of views, as in:
http://foo.com/aContact/info/index..html
To refer to the edit view, as a relative link, we need:
../edit/index.html
> Under what circumstances is the publisher supposed to generate a base
> tag?
Whenever the effective URL differs from the given URL.
> What is the contract between the publisher, and html views of an
> object, as in, what form or relative URL should a view expect to be able
> to present?
Normally, relative links are relative to a view.
> Are the "../whatever" links in the ZMI tabs a hack, or is that the way
> they're supposed to be?
It's the way they are suppposed to be.
Note that an alternative would be to use absolute URLs where the
views generate the absolute URLs for the content.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org