{ "info": { "author": "Harald Friessnegger", "author_email": "harald at webmeisterei dot com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python" ], "description": "Introduction\n============\n\n``lineage.index`` is an addon to `collective.lineage`_ that lets you\nsearch for content within a certain childsite.\n\n\nHow does it work?\n-----------------\n\n``lineage.index`` registers an index ``childsite`` on all items\nimplementing ``Products.CMFCore.interfaces.IContentish`` (which will be\nall Archetypes and Dexterity based content types).\n\nThe childsite's id can be used to search for content located in this\nchildsite.\n\nWhen listing items on the main portal, you can use the metadata-column\n``childsite`` to indicate which childsites the content has been\naggregated from.\n\n\nHow do I use it?\n----------------\n\nOnce installed, new content gets indexed under the id of its closest\nchildsite. Existing content requires a catalog update (see\n`Installation`_).\n\nYou can search for content within a childsite using the index::\n\n brains = portal_catalog(childsite='subsite1')\n\nEach brain has a metadata column telling which childsite it's located\nin::\n\n >>> brains[0].childsite\n 'subsite1'\n\nIf the item comes from the main portal (i.e. not inside a childsite),\n``None`` will be indexed. This allows you to find only content from the\nmain portal::\n\n >>> brains = portal_catalog(childsite=None)\n >>> brains[0].childsite is None\n True\n\nThere's also a vocabulary ``lineage.childsites`` listing the available\nchildsites with their title.\n\nTo show the title of the subsite of a brain you can use the utility\nview::\n\n