{
"info": {
"author": "Agendaless Consulting",
"author_email": "repoze-dev@lists.repoze.org",
"bugtrack_url": null,
"classifiers": [
"Framework :: BFG",
"Intended Audience :: Developers",
"Programming Language :: Python"
],
"description": "repoze.bfg.viewgroup\n====================\n\n``repoze.bfg.viewgroup`` is an extension for ``repoze.bfg`` which\nmakes it possible to make a ``bfg:viewgroup`` declaration in ZCML\nwhich acts much like ``bfg:view`` inasmuch as it results in a bfg view\nregistration. Unlike a \"normal\" ``bfg:view`` registration, however, a\n``bfg:viewgroup`` registration refers to one or more other bfg views\n(matching them by name, ``for`` interface, and request type). When a\n``bfg:viewgroup`` is invoked (either via traversal or via programmatic\nview execution), a viewgroup will return a response which appends all\nthe referenced view renderings together in a single body.\n\nThis package is largely by request for folks that enjoy using Zope 3\n\"content providers\" and \"viewlets\", although it is slightly less\nfeatureful, as bfg views themselves typically do not possess an\ninterface (they're just callables), so you cannot register a viewgroup\nagainst a view interface.\n\nNote that the author of ``repoze.viewgroup`` disagrees with the\nconcept on which its based; it seems more straightforward and\nunderstandable to him to just do the work in a view itself without all\nthis stupid machinery (the docs for this are particularly painful to\nwrite because they're entirely self-referential, a sure sign of stupid\nmachinery, so forgive me if I have trouble explaining it). This is\nlargely just a proof of concept, although a tested and functional one.\n\nInstallation\n------------\n\nInstall using setuptools, e.g. (within a virtualenv)::\n\n $ easy_install -i http://dist.repoze.org/lemonade/dev/simple \\\n repoze.bfg.viewgroup\n\nUsage\n-----\n\nTo use a viewgroup, you must:\n\n#. Create a ZCML registration which registers a viewgroup.\n\n#. Either invoke the viewgroup via normal URL traversal like a regular\n view - OR - use the ``provider`` API to inject content into your\n template using the viewgroup name.\n\nZCML Registration\n+++++++++++++++++\n\nCreate a ``bfg:viewgroup`` registration in ZCML via the\n``bfg:viewgroup`` directive::\n\n