1
##############################################################################
3
# Copyright (c) 2003 Zope Corporation and Contributors.
6
# This software is subject to the provisions of the Zope Public License,
7
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
# FOR A PARTICULAR PURPOSE.
13
##############################################################################
14
"""API Documentation macros
16
$Id: macros.py 106723 2009-12-17 23:16:34Z hannosch $
18
__docformat__ = 'restructuredtext'
20
from zope.component import getMultiAdapter
21
from zope.interface import implements
22
from zope.interface.common.mapping import IItemMapping
23
from zope.publisher.browser import BrowserView
25
class FormMacros(BrowserView):
26
implements(IItemMapping)
36
'addingdialog': 'page',
39
def __getitem__(self, key):
40
key = self.aliases.get(key, key)
41
context = self.context
42
request = self.request
43
for name in self.macro_pages:
44
page = getMultiAdapter((context, request), name=name)