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

Jim Fulton jim@zope.com
Fri, 28 Feb 2003 16:55:46 -0500


Paul Winkler wrote:
> On Tue, Feb 25, 2003 at 03:47:25PM -0500, 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.
> 
> 
> isn't that "container" in zope2?
> 
> 
>>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?
> 
> 
> so "here" and "context" would both be used, but would mean
> different things? 

I'm not sure what you mean. (Changing "here" to "container" ...)
The variable "context" would be used in views to refer to the
thing being viewed. The variable "container" might be used in
templated pages to refer to the container containing the
page. The variable "context" wouldn't be used for templated pages.

Does this make sense?

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