[Zope3-dev] "here" vs "context" for templates in content space

Tres Seaver tseaver@zope.com
28 Feb 2003 17:15:59 -0500


On Fri, 2003-02-28 at 17:05, Jim Penny wrote:
> On Fri, Feb 28, 2003 at 04:52:45PM -0500, Jim Fulton wrote:
> > Jim Fulton wrote:
> > >
> > >Templates used for views have a context variable for refering to
> > >the context of the view, the thing being viewed.
> > >
> > >Templated pages, which are templates used in content space, like
> > >traditional zpt templates, have a "context" variable for refering to
> > >the folder containing the template.
> > >
> > >We decided to use "context" in both cases, but the meaning of "context"
> > >is a little different in the two cases. I wonder if it would be better
> > >to use "here" to make things more familiar for Zope 2 users?
> > 
> > As many pointed out, "container" would be more correct than "here".
> > I wonder if anybody uses "container" in Zope 2.
> > 
> > Jim
> 
> I use it exclusively in Zope 2.  
> 
> "here" was always confusing, as it was not in Script (Python), and I just
> forgot to ever use here.  container worked.

'container' does't work if you use the templates to render anything
besides the folder they live in:  in that one special case, "container"
and "here", are the same object.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com