[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS - StandardMacros.py:1.1.2.1

Jim Fulton jim@zope.com
Sun, 6 Jan 2002 18:33:02 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS
In directory cvs.zope.org:/tmp/cvs-serv6659

Added Files:
      Tag: Zope-3x-branch
	StandardMacros.py 
Log Message:
Added standard_macros definition

=== Added File Zope3/lib/python/Zope/App/OFS/StandardMacros.py ===
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
# 
##############################################################################
"""

Revision information: $Id: StandardMacros.py,v 1.1.2.1 2002/01/06 23:33:01 jim Exp $
"""

from Zope.PageTemplate.PageTemplateFile import PageTemplateFile
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
from Zope.ComponentArchitecture.ContextDependent import ContextDependent

class StandardMacros(ContextDependent):

    __implements__ = IBrowserPublisher

    __template = PageTemplateFile('www/standard_macros.pt')

    def __getitem__(self, name):
        return self.__template.macros[name]