This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Introduction
============

``lineage.index`` is an addon to `collective.lineage`_ that lets you
search for content within a certain childsite.


How does it work?
-----------------

``lineage.index`` registers an index ``childsite`` on all items
implementing ``Products.CMFCore.interfaces.IContentish`` (which will be
all Archetypes and Dexterity based content types).

The childsite's id can be used to search for content located in this
childsite.

When listing items on the main portal, you can use the metadata-column
``childsite`` to indicate which childsites the content has been
aggregated from.


How do I use it?
----------------

Once installed, new content gets indexed under the id of its closest
childsite. Existing content requires a catalog update (see
`Installation`_).

You can search for content within a childsite using the index::

brains = portal_catalog(childsite='subsite1')

Each brain has a metadata column telling which childsite it's located
in::

>>> brains[0].childsite
'subsite1'

If the item comes from the main portal (i.e. not inside a childsite),
``None`` will be indexed. This allows you to find only content from the
main portal::

>>> brains = portal_catalog(childsite=None)
>>> brains[0].childsite is None
True

There's also a vocabulary ``lineage.childsites`` listing the available
childsites with their title.

To show the title of the subsite of a brain you can use the utility
view::

<ul tal:define="util context/@@childsite">
<li tal:repeat="item folderContents">
<span tal:replace="item/Title">Item 1</span> in
<span tal:replace="python: util.titleForKey(item.childsite)&gt;Subportal One&lt;/span&gt;&lt;br&gt; &lt;/li&gt;&lt;br&gt; &lt;/ul&gt;&lt;br&gt;&lt;br&gt;Installation&lt;br&gt;============&lt;br&gt;&lt;br&gt;Simply add ``lineage.index`` to your buildout eggs (no zcml slug is&lt;br&gt;needed thanks to z3c.autoinclude).&lt;br&gt;&lt;br&gt;Quickinstall ``Lineage Index``.&lt;br&gt;&lt;br&gt;In case you already have childsites and content that shall be indexed&lt;br&gt;go to ``portal_catalog/manage_catalogAdvanced`` and click the&lt;br&gt;``Update Catalog`` button to populate the index and the catalog&lt;br&gt;metadata.&lt;br&gt;&lt;br&gt;Gotchas&lt;br&gt;=======&lt;br&gt;&lt;br&gt;The vocabulary caches all childsite titles until zope is restarted.&lt;br&gt;If you add childsites you need to restart zope to make them show up&lt;br&gt;in the vocabulary.&lt;br&gt;&lt;br&gt;.. _`collective.lineage`: http://plone.org/products/collective-lineage/&lt;br&gt;&lt;br&gt;/nChangelog&lt;br&gt;=========&lt;br&gt;&lt;br&gt;0.5 (2015-06-25)&lt;br&gt;----------------&lt;br&gt;&lt;br&gt;- Depend on ``plone.api`` and use it to get the portal object.&lt;br&gt; [thet]&lt;br&gt;&lt;br&gt;- Add ``chilsiteForContext`` method, which returns the childsite UUID for a&lt;br&gt; given context.&lt;br&gt; [thet]&lt;br&gt;&lt;br&gt;- Upgrade to ``UUID`` basd indexing instead of using the ``id``. The id is not&lt;br&gt; unique and causes problems when multiple lineage subsites with the same id&lt;br&gt; are registered. Furthermore, the uuid can be used to retrieve the lineage&lt;br&gt; childsite object without traversing up the content tree. A upgrade step is&lt;br&gt; included.&lt;br&gt; [thet]&lt;br&gt;&lt;br&gt;&lt;br&gt;0.4 (2012-01-10)&lt;br&gt;----------------&lt;br&gt;&lt;br&gt;- PEP8 fixes&lt;br&gt; [claytron]&lt;br&gt;&lt;br&gt;- Use ``IContentish`` instead of ``IATContentType`` to ensure that all&lt;br&gt; CMF, AT and Dexterity based content gets indexed properly.&lt;br&gt; [claytron]&lt;br&gt;&lt;br&gt;0.3 (2012-01-08)&lt;br&gt;----------------&lt;br&gt;&lt;br&gt;- Make non child site content be indexed as ``None`` so that " main="" site"<br=""> content can be found via this index also.
[claytron]

- Make compatible with Plone 4.1
[jensens]

- Add ``catalog.xml`` and remove ``setuphandlers`` logic.
[jensens]

- Add ``collective.lineage`` to ``metadata.xml`` dependencies.
[jensens]

- PEP8 fixes
[jensens]

- Change extensions of reStructuredText files so they preview correctly.
[jensens]

- Moved code to GitHub
[jensens]

0.2 (2011-04-28)
----------------

- Since Lineage's ChildSite is not implementing IPloneSiteRoot anymore,
changed the indexing reference to implementing INavigationRoot
[tbesluau]

- For other versions of ATContentType, we need to try and import the interface(s)
with and without the 's'
[tbesluau]


0.1b1 (2010-03-16)
------------------

- Initial release
Release History

Release History

0.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1b1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lineage.index-0.5.tar.gz (13.4 kB) Copy SHA256 Checksum SHA256 Source Jun 25, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting