[Zope] Method Context Control

Michael Bernstein mbernstein@profitscape.net
Tue, 02 Feb 1999 13:33:49 -0800


Pavlos Christoforou wrote:
> 
> On Tue, 2 Feb 1999, Michael Bernstein wrote:
> > If this is not currently possible, I would like to suggest that a
> > 'context' attribute be added to <!-- #var -->, with the default being
> > 'context=here' (the current behaviour) and an additional value of
> > 'context=self' or perhaps 'context=origin' being made available.
> >
> > Another possible value for a 'context' attribute might be
> > 'context=parent' to move the context up one level in the hierarchy.
> 
> Lets suppose we have a document in the top level object named global_map
> with an entry like:
> 
> <A HREF="<!--# var title-->"><!--# var title--></A>
> <A HREF="<!--# var BASE1--><!--# var title-->"><!--# var title--></A>
> 
> How should the relative URL's or BASE variables be handled if this
> document is called from a subobject down the
> object hierarchy like <!--# var global_map context=origin--> ?
>

It should be handled exactly as if it were being called from the top
level directory. Where this would break the functionality of the links,
they should be constructed to create absolute URL's (as was discussed in
another thread concerning image relative URL's).

Please understand that I am not advocating changing the default behavior
of zope, but only to add a little extra control into DTML.

Michael.