{ "info": { "author": "RedTurtle Technology", "author_email": "sviluppoplone@redturtle.it", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Plone", "Framework :: Plone :: 4.3", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. contents::\r\n\r\nIntroduction\r\n============\r\n\r\nThis subsite product add to Plone some minimalistic **subsite** feature.\r\n\r\nBefore installing\r\n-----------------\r\n\r\nThis product try to perform the task adding minimal code to Plone but also need that part of the work\r\nwill be done by other software, in that case `Apache`__.\r\n\r\n__ http://en.wikipedia.org/wiki/Apache_HTTP_Server \r\n\r\nSo, if you are looking for a complete and self-contained subsite product for Plone, let try other products (like\r\n`Lineage`__) before this.\r\n\r\n__ http://pypi.python.org/pypi/collective.lineage/\r\n\r\nWhat is a subsite ?\r\n-------------------\r\n\r\nIn this document **a subsite is a section of your Plone site** that:\r\n\r\n* need (commonly) a different theme applied\r\n* the visitor surf the subsite accessing something like *domain.com/subsite*, *subsite.com*\r\n or *subdomain.domain.com*\r\n* the visitor can be not aware that he's visiting a subsection of a bigger site\r\n* site contributors (commonly) access the site through a *back-end.domain.com* domain\r\n* site contributors (can) see a different Plone theme\r\n* site contributors (commonly) see the whole site, not only the subsite (as far as they use the back-end URL)\r\n\r\nNote that this approach is not limited to a single subsite, but you can have more than once. All subsites are\r\nedited using a **back-end URL**, then visited using some **front-end URLs**\r\n\r\nNote also that you can continue having front-end contributors, but they are limited to the subsite when move\r\nin and out of folders, using TinyMCE, and so on. Again, they could not know that are inside Plone subsite.\r\n\r\nYou really need a subsite?\r\n--------------------------\r\n\r\nIf you *dont'* need a Plone site where...\r\n\r\n* you can create an internal link to a content inside another subsite\r\n* you can create a collection that take contents from more that a subsite\r\n* when you use the site search, you want to find also documents outside the subsite\r\n\r\n...probably you *don't need a subsite* but simply need a Zope instance with multiple Plone site inside it!\r\n\r\nBut if one of the behavior above are true, keep reading.\r\n\r\nSubsite sometimes is only matter of theme\r\n-----------------------------------------\r\n\r\nIf the concept of subsite inside your organization don't require \"isolation\" (of navigation, of breadcrumb,\r\nportal tabs, TinyMCE use, ...) probably you only need the Apache + Plone magic described there, not this\r\n(or other) subsite product.\r\n\r\nCreate a subsite Plone theme\r\n============================\r\n\r\nAs already noted, this product will do pretty much anything without Apache in front of Plone, and you'll need\r\nto customize your Apache rewrite rules.\r\n\r\nAll is based on some behavior already inside Plone, like the power to apply a Plone theme adding an HTTP header\r\nthat Plone will handle in a special way.\r\n\r\nAlso you will play no more with the Plone \"*Default theme*\" option under the \"*Theme settings*\" site setup section,\r\nor simply you will use this option only for the back-end theme.\r\n\r\nA full example available\r\n------------------------\r\n\r\nWe also provide a full `Plone subsite example theme`__, that use all that follow.\r\n\r\n__ http://pypi.python.org/pypi/example.rtsubsites_theme\r\n\r\nThe theme's interface\r\n---------------------\r\n\r\nYou need to create (or customize) the Plone theme that you want to apply to the subsite. Please **note** that\r\neven if you don't plan to see a different theme for the front-end, you still need to create an empty theme.\r\n\r\nCommonly this theme must be installed in your Plone site, but it must not register himself as Plone default theme\r\n(so don't use the ``default_skin=xxx`` attribute in your skins.xml Generic Setup file).\r\n\r\nThe only important part of the theme is the interface declaration.\r\nCommonly Plone themes have a file like ``plone_theme.mysite/plone_theme/mysite/browser/interfaces.py``.\r\n\r\nThe file looks like this:\r\n\r\n.. code-block:: python\r\n\r\n from plone.theme.interfaces import IDefaultPloneLayer\r\n \r\n class IThemeSpecific(IDefaultPloneLayer):\r\n \"\"\"Marker interface that defines a Zope 3 browser layer.\r\n \"\"\"\r\n\r\nYou need to change the interface as follow:\r\n\r\n.. code-block:: python\r\n\r\n from redturtle.subsites.frontend.browser import IFrontendLayer\r\n \r\n class IThemeSpecific(IFrontendLayer):\r\n \"\"\"Marker interface that defines a Zope 3 browser layer.\r\n \"\"\"\r\n\r\nSee also https://github.com/RedTurtle/example.rtsubsites_theme/blob/master/example/rtsubsites_theme/browser/interfaces.py\r\n\r\nOther theme's components\r\n------------------------\r\n\r\nAfter previous step you can continue adding element (JavaScript files, CSS, images, templates) normally. If you\r\ndon't need that the new theme doesn't looks like the default site theme, you theme is already finished.\r\n\r\nLogo viewlet\r\n------------\r\n\r\nThe logo viewlet provided with the product is customized, to take always the default logo from the subsite URL.\r\n\r\nIf you need to customize the logo viewlet in your theme, please think about extend the redturtle.subsites ones:\r\n\r\n.. code-block:: python\r\n\r\n\r\n from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile\r\n from redturtle.subsites.frontend.viewlets.logo import LogoViewlet as BaseLogoViewlet\r\n \r\n class LogoViewlet(BaseLogoViewlet):\r\n # do something here\r\n\r\nSee also https://github.com/RedTurtle/example.rtsubsites_theme/blob/master/example/rtsubsites_theme/browser/logo.py\r\n\r\nRemember: you need to perform this task only if you need to customize the logo viewlet.\r\n\r\nMark a Plone Folder as a Subsite\r\n================================\r\n\r\nThe first and only Plone task for obtain a subsite is to choose a Folder that must be the subsite.\r\n\r\nGo to the folder through ZMI and apply a new additional marker interface.\r\nFrom the \"*Interfaces*\" tab find the ``redturtle.subsites.backend.interfaces.ISubsiteRoot`` from the\r\n\"Available Marker Interfaces\" section and add it.\r\n\r\nYou can remove the marker from this same page.\r\n\r\nApply the theme (AKA get a Subsite)\r\n===================================\r\n\r\nWe will show now what to add to your Apache configuration and transform all this in the subsite environment\r\nwe need.\r\n\r\nRequestHeader\r\n-------------\r\n\r\nStarting from redturtle.subsites 2.1 whay our need is simple a `RequestHeader`__ additional configuration.\r\n\r\n__ http://httpd.apache.org/docs/2.0/mod/mod_headers.html#requestheader\r\n\r\nNote that this only works if the ``request_varname`` of ``portal_skins`` tool will be changed from ``plone_skin`` to\r\n``HTTP_PLONE_SKIN``. You can do this manually from ZMI (*REQUEST variable name* field) or through Generic Setup\r\n(see\r\nhttps://github.com/RedTurtle/example.rtsubsites_theme/blob/master/example/rtsubsites_theme/profiles/default/skins.xml\r\n).\r\n\r\nYou need to write something like this::\r\n\r\n RequestHeader append plone_skin \"The name of the Theme\"\r\n\r\nDifferent domain (or subdomain) how-to\r\n--------------------------------------\r\n\r\nWhen your subsite domain is something like *subsite.com* (or *subdomain.mycompany.com*) the configuration is quite\r\nsimple. You will provide to your Apache a ``subsite.com.conf`` file with something like this inside::\r\n\r\n \r\n ServerName subsite.com\r\n ServerAlias www.subsite.com\r\n ServerAdmin ...\r\n\r\n ...\r\n\r\n RewriteEngine On\r\n\r\n RequestHeader append plone_skin \"The name of the Theme\"\r\n\r\n RewriteRule ^/(.*) \\\r\n \"http://127.0.0.1:8080/VirtualHostBase/http/%{SERVER_NAME}:80/Plone/VirtualHostRoot/subsite/$1\" [L,P]\r\n ProxyPassReverse / http://127.0.0.1:8080/\r\n \r\n ...\r\n \r\n \r\n\r\nSubsite inside a subpath how-to\r\n-------------------------------\r\n\r\nIf you already have a Plone site at mycompany.com, and visiting http://mycompany.com/subsite you need a subsite,\r\nthe configuration is complex because you need to handle both in the same ``.conf`` file::\r\n\r\n \r\n ServerName mycompany.com\r\n ServerAlias www.mycompany.com\r\n ServerAdmin ...\r\n\r\n ...\r\n\r\n RewriteEngine On\r\n\r\n SetEnvIf Request_URI \"^/subsite(.*)\" SUBSITE\r\n RequestHeader append plone_skin \"The name of the Theme\" env=SUBSITE\r\n\r\n RewriteRule ^/(.*) \\\r\n \"http://127.0.0.1:8080/VirtualHostBase/http/%{SERVER_NAME}:80/Plone/VirtualHostRoot/$1\" [L,P]\r\n ProxyPassReverse / http://127.0.0.1:8080/\r\n\r\n ...\r\n\r\n \r\n\r\nAdditional products\r\n===================\r\n\r\nIf you like also to manage portal tab of your subsites in a different way that isn't the standard Plone\r\nbehavior, take a look at `collective.navroottabs`__. With this you will be able also to customize different\r\nportal tabs for your subsites. \r\n\r\n__ http://plone.org/products/collective.navroottabs\r\n\r\nDependencies\r\n============\r\n\r\nTested on Plone 4.3.\r\n\r\nTODO\r\n====\r\n\r\nAs we removed ``p4a.subtyper``, the subsite marker can only be given through ZMI access. This will probably\r\nchange in the future.\r\n\r\nCredits\r\n=======\r\n\r\nDeveloped with the support of `Rete Civica Mo-Net - Comune di Modena`__;\r\nRete Civica Mo-Net supports the `PloneGov initiative`__.\r\n\r\n.. image:: http://www.comune.modena.it/grafica/logoComune/logoComunexweb.jpg\r\n :alt: Comune di Modena - logo\r\n\r\n__ http://www.comune.modena.it/\r\n__ http://www.plonegov.it/\r\n\r\nAuthors\r\n=======\r\n\r\nThis product was developed by RedTurtle Technology team.\r\n\r\n.. image:: http://www.redturtle.it/redturtle_banner.png\r\n :alt: RedTurtle Technology Site\r\n :target: http://www.redturtle.it/\r\n\r\nChangelog\r\n=========\r\n\r\n2.1.0 (2014-10-10)\r\n------------------\r\n\r\n- Removed old deprecated code [keul]\r\n- Added skinswitcher, now handle skin switch in Plone and not Apache.\r\n This will fix issue with Plone 4.1.5 and up [keul] \r\n- Added MANIFEST file [keul]\r\n\r\n2.0.0 (2011-07-29)\r\n------------------\r\n\r\n* First public release\r\n* Plone 4 (maybe also 3.3 but not 3.2 or lower for sure) compatibility [keul]\r\n* z3c.autoincude support [keul]\r\n* Bye bye p4a.subtyper [keul]\r\n* Changed logo viewlet: Plone 3.3 and above already refer to INavigationRoot [keul]\r\n* Removed the getNavigationRoot patch, as ticket #8787 has been closed [keul]\r\n* Now also JavaScript registry refer to subsite root, this fix JavaScript errors in the\r\n frontend [keul]\r\n\r\n1.0.3 (2009-01-28)\r\n------------------\r\n\r\n* The traversal adapter was raising a lot of conflict error because all of the requests\r\n were trying to apply the INavigationRoot on the subsite [keul]\r\n\r\n1.0.2 (2008-12-11)\r\n------------------\r\n\r\n* Applied a monkey patch for fixing a bug in the getNavigationRoot method of plone.\r\n See https://dev.plone.org/plone/ticket/8787 [keul]\r\n\r\n1.0.1 (2008-12-05)\r\n------------------\r\n\r\n* Added support to browser layer CSS [amleczko]\r\n\r\n1.0.0 (2008-11-18)\r\n------------------\r\n\r\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://plone.org/products/redturtle.subsites", "keywords": "subsite plone plonegov folder theme layout", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "redturtle.subsites", "package_url": "https://pypi.org/project/redturtle.subsites/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/redturtle.subsites/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://plone.org/products/redturtle.subsites" }, "release_url": "https://pypi.org/project/redturtle.subsites/2.1.0/", "requires_dist": null, "requires_python": null, "summary": "Subsites feature in Plone", "version": "2.1.0" }, "last_serial": 1254280, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "909a6d3a5e5beabb1cd7c13af1721beb", "sha256": "d34e3f68fbd7f0a802bdd57168a3d576fc34b5784575c652da4ec092f89b751b" }, "downloads": -1, "filename": "redturtle.subsites-2.0.0-py2.6.egg", "has_sig": false, "md5_digest": "909a6d3a5e5beabb1cd7c13af1721beb", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 26517, "upload_time": "2011-07-29T12:35:27", "url": "https://files.pythonhosted.org/packages/87/4b/60c9c2d9e9ebb7e264d95b97926805ee9508f835db62fb5d6431bf1117c2/redturtle.subsites-2.0.0-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "66e15bff2c47648f4019ad275cc6ca2f", "sha256": "f104474b30c7617fd1e2f87d10403b741d441a88f4c15a67a1d4fa2157c58753" }, "downloads": -1, "filename": "redturtle.subsites-2.0.0.tar.gz", "has_sig": false, "md5_digest": "66e15bff2c47648f4019ad275cc6ca2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18734, "upload_time": "2011-07-29T12:35:27", "url": "https://files.pythonhosted.org/packages/66/f2/32a4162a59c0767f411b423a1dfc5203971e29744132ebd61cb8ee47d2f5/redturtle.subsites-2.0.0.tar.gz" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "03e57024e220b431bc14476050ca04af", "sha256": "b72b803a8e90a4bdd5491558d1be232fac0d67720972edbc0b03e0f301fe3aa2" }, "downloads": -1, "filename": "redturtle.subsites-2.1.0.zip", "has_sig": false, "md5_digest": "03e57024e220b431bc14476050ca04af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34069, "upload_time": "2014-10-10T12:06:27", "url": "https://files.pythonhosted.org/packages/81/da/f72fb207bc99bcec9cfd9590cfb670991e239786c84b6899ad24e2ee77f8/redturtle.subsites-2.1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "03e57024e220b431bc14476050ca04af", "sha256": "b72b803a8e90a4bdd5491558d1be232fac0d67720972edbc0b03e0f301fe3aa2" }, "downloads": -1, "filename": "redturtle.subsites-2.1.0.zip", "has_sig": false, "md5_digest": "03e57024e220b431bc14476050ca04af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34069, "upload_time": "2014-10-10T12:06:27", "url": "https://files.pythonhosted.org/packages/81/da/f72fb207bc99bcec9cfd9590cfb670991e239786c84b6899ad24e2ee77f8/redturtle.subsites-2.1.0.zip" } ] }