Pavlos Christoforou wrote:
On Tue, 2 Feb 1999, Amos Latteier wrote:
def tpURL(self): """Return string to be used as URL relative to parent. The tree tag accumulates the tpURL of objects as it traverses the tree. At any given point during dtml rendering within the tree tag, you can use:: <!--#var tree-item-url--> to get the url up to the point of the current object being rendered. """
I had the same problem with Michael in designing a global navigation side margin. If the tree tag is used in a different frame like the Zope management screens then all is well, because the frame always refers to the same URL. If however one decides to use tables to create the global side margin then the context in which the global side margin method is called becomes important.
So what? Should relative URLs still be correct? I guess that what you want is absolute URLs that (mostly) don't depend on context.
Before Pricipia was open sourced my TinyZope module had a similar BaseClass to Zope's Folder which computed and set the absolute URL of any object added in that folder. It was easy then to construct Global navigation aids, but with Zope I can not see a simple clean way of doing it unless someone uses ZClient to call the relevant method.
I'm not sure what ZClient has to do with it. I guess you want a navigation bar in a standard header or footer that provides absolute URL to some standard places that don't depend on where you are. Right? I think that the 1.10 absolute URL machinery (absolute_url method defined in SimpleItem.Item and therefore in all framework objects) should make this alot easier. We'll put together a demonstration of this. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (888) 344-4332 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.