Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

pypm install ftw.topics

How to install ftw.topics

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install ftw.topics
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
1.0 Available View build log
Linux (64-bit)
1.0 Available View build log
Lastest release
version 1.0 on May 30th, 2013


This package integrates a subject tree into Plone.

  • Dexterity based content types "Topic Tree" and "Topic" for

System Message: WARNING/2 (<string>, line 10)

Bullet list ends without a blank line; unexpected unindent.

creating a topic tree (subject tree).

  • Archetypes schema extender, adding a reference field "topics" to

System Message: WARNING/2 (<string>, line 13)

Bullet list ends without a blank line; unexpected unindent.

all objects prividing ITopicSupport for assigning content to a topic.

  • The topic-view lists all content referenced the topic.
  • Simplelayout support for topics, so that additional content

System Message: WARNING/2 (<string>, line 19)

Bullet list ends without a blank line; unexpected unindent.

can be added to the topic view.

  • Add ftw.topics to your buildout configuration:

System Message: ERROR/3 (<string>, line 27)

Unknown directive type "code".

.. code:: ini

[instance] eggs += ftw.topics

  • Install the default generic import profile.
ITopicSupport for Archetypes

For activating the schema extender install the archetypes extras:

System Message: ERROR/3 (<string>, line 41)

Unknown directive type "code".

.. code:: ini

[instance] eggs += ftw.topics [archetypes]

Enable the ITopicSupport interface on the archetypes content type classes you want to have the topics reference field:

System Message: ERROR/3 (<string>, line 52)

Unknown directive type "code".

.. code:: xml

<configure xmlns="http://namespaces.zope.org/zope" i18n_domain="my.package">

<class class="my.package.content.mytype.MyTyp"> <implements interface="ftw.topics.interfaces.ITopicSupport" /> </class>


If you have ftw.contentpage installed, ITopicSupport is automatically enabled for content pages.

ITopicSupport for Dexterity

If you would like to have the topics field on dexterity based types, use the ITopicSupportSchema behavior:

System Message: ERROR/3 (<string>, line 74)

Unknown directive type "code".

.. code:: xml

<?xml version="1.0"?> <object name="example.conference.presenter" meta_type="Dexterity FTI" xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="example.conference">

<!-- enabled behaviors --> <property name="behaviors"> <element value="ftw.topics.behavior.ITopicSupportSchema" /> </property>


Simplelayout support

The Simplelayout support is using the block types of the ftw.contentpage package, so it installs the contentpage package. Use the simplelayout extras for installing the required packages:

System Message: ERROR/3 (<string>, line 97)

Unknown directive type "code".

.. code:: ini

[instance] eggs += ftw.topics [simplelayout]

Install the simplelayout generic setup profile (profile-ftw.topics:simplelayout).

Customizing reference representations

The ITopicReferencePresentation adapters are responsible for rendering the references on the topic view. The adapters consume all items they know and render them in a section of the view.

ftw.topics includes an ITopicReferencePresentation for rendering content pages and a default adapter for all contents which are not consumed by another adapter.

Adding a custom representation adapter is easy:

System Message: ERROR/3 (<string>, line 118)

Unknown directive type "code".

.. code:: python

from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from ftw.topics.browser.representation import DefaultRepresentation from my.package.interfaces import IMyType from my.package import _

class MyRepresentation(DefaultRepresentation): template = ViewPageTemplateFile('my_representation.pt')

def consume(self, objects): for obj in objects: if IMyType.providedBy(obj): self.objects.append(obj) else: yield obj

def title(self): return _(u'label_my_objects', default=u'My objects')

def position(self): return 50

consume() Be sure that you yield all objects which you do not handle in your adapter. They will be passed up the pipeline until another adapter handles them. The last adapter is usually the default representation adapter, which consumes all left over objects.

title() Return the title for your section.

position() The adapters are ordered by position. The default adapter has the position 1000, the ftw.contentpage adapter has the position 100.

Register your adapter with ZCML:

System Message: ERROR/3 (<string>, line 157)

Unknown directive type "code".

.. code:: xml

<configure xmlns="http://namespaces.zope.org/zope">

<adapter factory=".representation.MyRepresentation" name="my_representation" />


Be sure you give the adapter a name, so that it does not conflict with other adapters.


A viewlet shows all referenced topics on an object with ITopicSupport.


1.0 (2013-05-24)
  • Initial implementation.

Subscribe to package updates

Last updated May 30th, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.