{ "info": { "author": "Vitaliy Podoba", "author_email": "vitaliy@martinschoel.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python" ], "description": "Introduction\n============\n\nThis package extends the default Plone portlets framework to allow for the assignment\nof portlets on a per-view basis.\n\n\nOverview\n--------\n\nSometimes it may really be useful to have a different portlet assigned to\nstandalone views which are not necessary coupled to any content objects.\nYou may think that in this case it is possible to create a new content object\nand apply that view to it and then finally assign the required portlets to\nthat object. However, in ``Plone`` you may end up creating new content objects\nfor every standalone zope3 view - which is not correct from a content management\npoint of view.\n\nIn one of our projects we had a lot of standalone views where it was a requirement\nto have different portlets assigned to a standalone view (e.g. having a separate set of\nportlets on user profile views, sitemap view, ``z3c.form`` form views, homepage view, etc.)\n\nTo facilitate the adding of portlets there we developed this package called\n``collective.viewportletmanager``. It is aimed at usage by ``Plone`` integrators\nand is not working out of the box. To be able to assign portlets to your zope3\nview you have to follow some simple rules.\n\nMore on this below in ``How to use`` section.\n\n\nCompatibility\n-------------\n\nThis add-on was tested on ``Plone 3.3.5`` and ``Plone 4.1``\n\n\nInstallation\n------------\n\n* to add the package to your ``Zope`` instance, please, follow the instructions\n found inside the ``docs/INSTALL.txt`` file\n* then restart your ``Zope`` instance\n* and install the ``View Portlet Manager package from within the ``portal_quickinstaller`` tool\n\n\nHow to use\n----------\n\nThis packages allows you to assign ``Plone 3`` portlets to your custom zope3\nviews. To be able to do this we require from you the only one extra step:\nmark your view with ``IPortletsAwareView`` interface::\n\n from zope.interface import implements\n from Products.Five.browser import BrowserView\n from collective.viewportletmanager.interfaces import IPortletsAwareView\n \n class MyZope3View(BrowserView):\n implements(IPortletsAwareView)\n \n # your zope3 view code goes here\n\nAfter you declare that your zope3 view implements ``IPortletsAwareView``\ninterface, restart your zope instance and render your view. From now on you'll\nsee there ``Manage view portlets`` link. This link will get you to portlets\nmanagement screen which is exactly the same as default ``Manage portlets`` view.\nThe only difference is that ``Manage view portlets`` view will allow you to\nmanage portlets for your ``IPortletsAwareView`` marked view.\n\nThe portlets you add on that view will be available only while visiting your\ncustom zope3 view.\n\nOne more important note here is that portlets are not assigned based on view alone,\nbut are based on context object as well. So we may say that view-based portlets\nare actually view-context based portlets.\n\nView portlets will go right after context based portlets like other site-wide\nportlets.\n\nYou'll also be able to block view based portlets via the standard ``Manage\nportlets`` screen.\n\n\nDesign Notes\n------------\n\nThe main thing is that view portlets are saved into ``Plone`` site root\nannotations like any other site-wide portlet categories but at the same time\nview category mappings hold context object UIDs so actually view category\ndoesn't look like site-wide but context based portlets category.\n\nView portlets category uses the next assignments key format::\n\n \":\"\n \nSo, for object with uid equal \"123\" and it's view called \"my-view\" we'll get\nportlet assignments saved under \"123:my-view\" key in \"view\" category inside\nglobal site portlet manager annotations.\n\nFor site root, which doesn't provide \"UID\" attribute we use string placeholder\n\"nouid\". E.g. portlet assignments for \"sitemap\" view will be saved under\n\"nouid:sitemap\" key.\n\n\nThis package overrides a bunch of standard ``Plone`` portlets framework\ncomponents in order to add view portlets category to list of standard\nportlet categories: context, user, group and content type.\n\nHere we'll try to describe what exactly was overridden:\n\n``PortletContext`` both for site root and site content in order to add view\ncategory to standard categories list. This context also takes care of\ngenerating view key based on object \"UID\" and view name. To get view name\nportlet context retrieves view as an argument to it's\n``globalPortletCategories`` method, which actually breaks default ``Plone``\nportlets framework designed API. To pass view object around we also had to\noverride portlet manager renderer and portlet retrievers.\n\n``PortletManagerRenderer``: to pass view object down to portlet retriever class.\n\n``PortletRetriever``: to pass view object down to ``PortletContext`` which in\nturn will use it to generate view category key.\n\n``ContextualEditPortletManagerRenderer`` view to provide view category blacklist\nstatus to be used on standard ``Manage portlets`` screen.\n\n``EditPortletManagerRenderer`` to disable inherited portlets on ``Manage view\nportlets`` screen. This doesn't make much sense for view category portlets.\n\n``ManageContextualPortlets`` to provide set blacklist status method which will\nalso take care of view category blacklist status.\n\n``ManageViewPortlets``: our own ``Manage view portlets`` view\n\n``ManageViewPortletsLinkViewlet``: our own viewlet that renders ``Manage view\nportlets`` link pointing to appropriate portlets management screen for current\ncontent object and zope3 view. Link appears only on ``IPortletsAwareView``\nenabled zope3 views.\n\n\nLive Examples\n=============\n\n* http://www.choosehelp.com/\n* http://www.choosehelp.com/profile/John/\n\n\nCredits\n=======\n\n\nCompanies\n---------\n\n|martinschoel|_\n\n* `Martin Schoel Web Productions `_\n* `Contact us `_\n\n\nAuthors\n-------\n\n* Vitaliy Podoba \n\n\nContributors\n------------\n\n\n.. |martinschoel| image:: http://cache.martinschoel.com/img/logos/MS-Logo-white-200x100.png\n.. _martinschoel: http://www.martinschoel.com/\n\nChangelog\n=========\n\n1.0 (August 23, 2011)\n---------------------\n\n- Initial release\n [piv]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.plone.org/svn/collective/collective.viewportletmanager", "keywords": "plone portlet view", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "collective.viewportletmanager", "package_url": "https://pypi.org/project/collective.viewportletmanager/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.viewportletmanager/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://svn.plone.org/svn/collective/collective.viewportletmanager" }, "release_url": "https://pypi.org/project/collective.viewportletmanager/1.0/", "requires_dist": null, "requires_python": null, "summary": "Allows assigning portlets on per view basis.", "version": "1.0" }, "last_serial": 788272, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "10681a1b32db83036add928a2c5dbdb1", "sha256": "e5d3333af8b89a90f1cf28ead72d5f330c9645d941a8be92291519197b7c3cd0" }, "downloads": -1, "filename": "collective.viewportletmanager-1.0.tar.gz", "has_sig": false, "md5_digest": "10681a1b32db83036add928a2c5dbdb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25209, "upload_time": "2011-08-23T10:25:39", "url": "https://files.pythonhosted.org/packages/a9/a4/4aa2c03beac0d7cc08d579ed2425716b14a77e6869b284261d058c341e8a/collective.viewportletmanager-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "10681a1b32db83036add928a2c5dbdb1", "sha256": "e5d3333af8b89a90f1cf28ead72d5f330c9645d941a8be92291519197b7c3cd0" }, "downloads": -1, "filename": "collective.viewportletmanager-1.0.tar.gz", "has_sig": false, "md5_digest": "10681a1b32db83036add928a2c5dbdb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25209, "upload_time": "2011-08-23T10:25:39", "url": "https://files.pythonhosted.org/packages/a9/a4/4aa2c03beac0d7cc08d579ed2425716b14a77e6869b284261d058c341e8a/collective.viewportletmanager-1.0.tar.gz" } ] }