Skip to main content

Default content types for Plone based on Dexterity

Project description

Introduction offers default content types for Plone based on Dexterity. This package replaces Products.ATContenttypes and will provide the default-types in Plone 5.

It contains the following types:

  • Folder

  • Document

  • News item

  • File

  • Image

  • Link

  • Event (Using behaviors from

  • Collection (this already replaces which is no longer needed then)

The main difference from a users perspective is that these types are extendable through-the-web. This means you can add or remove fields and behaviors using the control-panel “Dexterity Content Types” (/@@dexterity-types).

The aim is to mimick the default-types as closely as possible. has been merged into the Plone 5.0 branch and will be shipped with the next Plone release:

Warning: Using on a site with existing content requires migrating the sites content. Please see the chapter “Migration”. It can be used on a new site without problems.


Version 1.1b1 is tested with Plone 4.3.x. The versions 1.1.x will stay compatible with Plone 4.3.x.

For support of Plone 4.1 and 4.2 please use version 1.0.x. Please note that they do not provide the full functionality.

The future versions 1.2.x will be compatible with Plone 5 only and add support for


Add this line in the eggs section of your buildout.cfg:

eggs =

If you have a mixed Plone site with Archetypes content and dexterity content use the extra requirement:

`` ['atrefs']``

What happens to existing content?

If you install in a existing site all Archetypes-based content of the default types still exists and can be viewed but can’t be edited. On installation removes the type-definitions for the old default-types like this:

<object name="Document" remove="True" />

They are then replaced by new Definitions:

<object meta_type="Dexterity FTI" name="Document" />

To make the existing content editable again you need to migrate it to Dexterity (please see the section on migration) or uninstall (see the section on uninstalling).

Archetypes-based content provided by add-ons (e.g. Products.PloneFormGen) will still work since only the default-types are replaced.

If you install on a fresh site (i.e. when no content has been edited or added) the usual default-content (Events, News, Members…) will be created as dexterity-content.


To remove and return full functionality to old content and restore the AT-based default-types you have to install the import step “Types Tool” of the current base profile. Follow the following steps:

  • in the ZMI navigate to portal_setup and the tab “import”

  • in “Select Profile or Snapshot” leave “Current base profile (<Name of your Plonesite>)” selected. This is usually Products.CMFPlone

  • select the Types Tool (usually Step 44)

  • click “import selected steps”

Any content you created based on will not be editable until you reinstall


  • >= 2.0.7. Dexterity is shipped with Plone 4.3.x. Version pinns for Dexterity are included in Plone 4.2.x. For Plone 4.1.x you need to pin the correct version for Dexterity in your buildout. See Installing Dexterity on older versions of Plone.

  • plone.dexterity >= 2.2.1. Olders version of plone.dexterity break the rss-views because uses behaviors for the richtext-fields.

  • >= 1.1b1. This provides the behaviors used for the event-type.

  • >= 2.5a1. In older version the event-portlet will not work with the new event-type.

These are the version-pinns for Plone 4.3.2:

versions = versions

plone.dexterity = 2.2.1 = 2.0.11
plone.schemaeditor = 1.3.5 = 1.1b1 = 2.5a1


To migrate your existing content from Archetypes to Dexterity use the form at /@@atct_migrator.

For migrations to work you need at least Products.contentmigration = 2.1.3 (part of Plone since Plone 4.2.5) and (part of Plone since Plone 4.1.0).

Migrating Archetypes-based content to can migrate the following default types:

  • Document

  • Event

  • File

  • Folder

  • Image

  • Link

  • News Item

  • Collection

The following non-default types will also be migrated:

  • The AT-based Event-type provided by

  • The DX-based Event-type provided by

  • The Event-type provided by until version 1.0

  • News Items with blobs (provoded by

  • Files and Images without blobs

  • AT-based collection provided by

Migrations that might come in a future version:

  • from ATTopic to Collections

Please note that migrating versions of content is not supported. Only the current state of items is migrated without any content- or workflow-history.

Migrating content that is translated with LinguaPlone

Since LinguaPlone does not support Dexterity you need to migrate from LinguaPlone to ( The migration from Products.LinguaPlone to should happen before the migration from Archetypes to For details on the migration see

Migrating from old versions of

Before version 1.0a2 the content-items did not implement marker-interfaces. They will break in newer versions since the views are now registered for these interfaces (e.g. To fix this you can call the view /@@fix_base_classes on your site-root.

Since 1.1, the Collection type uses the new Collection behavior and the Event type utilizes behaviors from In order to upgrade:

  1. First run the default profile ( and

  2. Then run the upgrade steps.

Migrating default-content that was extended with archetypes.schemaextender

The migration should warn you if any of your types are extended with archetypes.schemaextender. The data contained in these fields will be lost.

You need to implement a custom migration for your types and dexterity-behaviors for the functionality provided by the schemaextenders. This is an advanced development task and beyond the scope of this documentation.

Migrating custom content

Custom content-types will not be touched by the migration and will continue to work as expeced. However if you’d like to migrate your content-types to Dexterity (you’ll have to create these types in Dexterity first) you might want to have a look at the code of as a blueprint.


When used in Plone 4.x uses the default z3c.form widgets. All widgets work as they used to with Archetypes except for the keywords-widget for which a simple linesfield is used.

It is recommended to use to switch to the widgets that will be used in Plone 5.

How to use with


How to override widgets

To override the default keywords-widgets with a nicer widget you can use the package collective.z3cform.widgets.

Add collective.z3cform.widgets to your buildout and in your own package register the override in your configure.zcml:

<adapter factory=".subjects.SubjectsFieldWidget" />

Then add a file

# -*- coding: UTF-8 -*-
from collective.z3cform.widgets.token_input_widget import TokenInputFieldWidget
from import ICategorization
from import IPloneFormLayer
from z3c.form.interfaces import IFieldWidget
from z3c.form.util import getSpecification
from z3c.form.widget import FieldWidget
from zope.component import adapter
from zope.interface import implementer

@adapter(getSpecification(ICategorization['subjects']), IPloneFormLayer)
def SubjectsFieldWidget(field, request):
    widget = FieldWidget(field, TokenInputFieldWidget(field, request))
    return widget

Once you install collective.z3cform.widgets in the quickinstaller, the new widget will then be used for all types.

Information for Addon-Developers

Design decicions

The schemata for the types File, Image and Link are defined in xml-files using plone.supermodel. This allows the types to be editable trough the web. The types Document, News Item, Folder and Event have no schemata but only use behaviors to provide their fields.

Installation as a dependency from another product

If you want to add as a dependency from another products use the profile plone-content in your metadata.xml to have Plone populate a new site with DX-based default-content.


If you use the profile default then the default-content in new sites will still be Archetypes-based. You’ll then have to migrate that content using the migration-form @@atct_migrator or delete it by hand.

Extending the types

You have several options:

  1. Extend the types through-the-web by adding new fields or behaviors in the types-controlpanel /@@dexterity-types.

  2. Extend the types with a custom type-profile that extends the existing profile with behaviors, or fields.

    You will first have to add the type to your [yourpackage]/profiles/default/types.xml.

    <?xml version="1.0"?>
    <object name="portal_types" meta_type="Plone Types Tool">
      <object name="Folder" meta_type="Dexterity FTI" />

    Here is an example that enables the image-behavior for Folders in [yourpackage]/profiles/default/types/Folder.xml:

    <?xml version="1.0"?>
    <object name="Folder" meta_type="Dexterity FTI">
     <property name="behaviors" purge="False">
      <element value=""/>

    By adding a schema-definition to the profile you can add fields.

    <?xml version="1.0"?>
    <object name="Folder" meta_type="Dexterity FTI">
     <property name="model_file">your.package.content:folder.xml</property>
     <property name="behaviors" purge="False">
      <element value=""/>

    Put the schema-xml in your/package/content/folder.xml (the folder content needs a

    <model xmlns:security=""
        <field name="teaser_title" type="zope.schema.TextLine">
          <title>Teaser title</title>
        <field name="teaser_subtitle" type="zope.schema.Text">
          <title>Teaser subtitle</title>
        <field name="teaser_details" type="">
          <title>Teaser details</title>

For more complex features you should create custom behaviors and/or write your own content-types. For more information on creating custom dexterity-types or custom behaviors to extend these types with read the dexterity documentation.

Reordering fields provided by behaviors


Differences to Products.ATContentTypes

  • The image of the News Item is not a field on the contenttype but a behavior that can add a image to any contenttypes (similar to

  • All richtext-fields are also provided by a reuseable behavior.

  • The functionality to transform (rotate and flip) images has been removed.

  • There is no more field Location. If you need georeferenceable consider using collective.geo.behaviour

  • The link on the image of the newsitem triggers an overlay

  • The link-type now allows the of the variables ${navigation_root_url} and ${portal_url} to construct relative urls.

  • The keywords-widget is nit implemented and ootb is only a lines-widget. See the section on widgets.


ValueError on installing

When you try to install in a existing site you might get the following error:

  Module Products.GenericSetup.utils, line 509, in _importBody
  Module Products.CMFCore.exportimport.typeinfo, line 60, in _importNode
  Module Products.GenericSetup.utils, line 730, in _initProperties
ValueError: undefined property 'schema'

Before installing you have to reinstall to update collections to the version that uses Dexterity.


The master-branch supports Plone 5 only. From this 1.2.x-releases will be cut.

The 1.1.x-branch supports Plone 4.3.x. From this 1.1.x-releases will be cut.


GNU General Public License, version 2



1.1b1 (2014-02-19)

  • Add tests for collections and collection-migrations. [pbauer]

  • Removed Plone 4.2 compatibility. [pbauer]

  • Add migration of at-collections to the new collection-behavior. [pbauer]

  • Display richtext in collection-views. [pbauer]

  • Reorganize and improve documentation. [pbauer]

  • Add a richtext-behavior and use it in for all types. [amleczko, pysailor]

  • Improve the migration-results page (Fix #67). [pbauer]

  • For uneditable content show a warning and hide the edit-link. [pbauer]

  • Keep all modification-date during migration (Fix #62). [pbauer]

  • Only attempt transforming files if valid content type. [vangheem]

  • Make the collection behavior aware of INavigationRoot. Fixes #98 [rafaelbco]

  • Use unique URL provided by to show the large version of a news item’s lead image. This allows use of a stronger caching policy. [rafaelbco]

  • Fix URL for Link object on the navigation portlet if it contains variables (Fix #110). [rafaelbco]

1.1a1 (2013-11-22)

  • Event content migration for Products.ATContentTypes ATEvent,’s ATEvent and Dexterity example type and 1.0 Event to 1.1 Event based on’s Dexterity behaviors. [lentinj]

  • Collection: get querybuilderresults view instead of using the QueryBuilder class directly. [maurits]

  • Fix migration restoreReferencesOrder removes references [joka]

  • Enable summary_view and all_content views for content types that have the collection behavior enabled. Define collection_view for those types so you can view the results. These simply show the results. The normal view of such a type will just show all fields in the usual dexterity way. [maurits, kaselis]

  • Add customViewFields to the Collection behavior. This was available on old collections too. [maurits, kaselis]

  • Change Collection to use a behavior. Issue #65. [maurits, kaselis]

  • Improved test coverage for test_migration [joka]

  • Add tests for vocabularies used for the migration [maethu]

  • Add migration-form /@@atct_migrate based on initial work by gborelli [pbauer, tiazma]

  • Add ATBlob tests and use migration layer for test_migration [joka]

  • Integrate [thet]

1.0 (2013-10-08)

  • Remove AT content and create DX-content when installing in a fresh site. [pbauer]

  • Remove obsolete extra ‘migrate_atct’. [pbauer]

  • Add link and popup to the image of News Items. [pbauer]

  • Use the default profile title for the example content profile. [timo]

  • Unicode is expected, but obj.title and/or obj.description can be still be None in SearchableText indexer. [saily]

1.0rc1 (2013-09-24)

  • Implement a tearDownPloneSite method in to prevent test isolation problems. [timo]

  • Its possible to upload non-image data into a newsitem. The view was broken then. Now it shows the uploaded file for download below the content. Its no longer broken. [jensens]

  • Add contributor role as default for all add permissions in order to work together with the different plone worklfows, which assume it is set this way. [jensens]

  • fix #60: File Type has no mimetype specific icon in catalog metadata. Also fixed for Image. [jensens]

  • fix #58: Migration ignores “Exclude from Navigation”. [jensens]

  • disable LinkIntegrityNotifications during migrations, closes #40. [jensens]

  • Fix Bug on SearchableText_file indexer when input stream contains characters not convertable in ASCII. Assumes now utf-8 and replaces all unknown. Even if search can not find the words with special characters in, indexer does not break completely on those items. [jensens]

  • Remove dependency on, as it depends on Products.Archetypes which installs the uid_catalog. [thet]

  • Make collection syndicatable. [vangheem]

  • Include the migration module not only when Products.ATContentTypes is installed but also archetypes.schemaextender. The schemaextender might not always be available. [thet]

  • Add fulltext search of file objects. [do3cc]

  • Fix link_redirect_view: Use index instead of template class var to let customization by ZCML of the template. [toutpt]

  • Add a permission for each content types. [toutpt]

1.0b2 (2013-05-31)

  • Fix translations to the plone domain, and some translations match existing translations in the plone domain. (ported from [bosim]

  • Fix atct_album_view and don’t use [pbauer]

  • Add constrains for content create with the Content profile. [ericof]

  • Add SearchableText indexer to Folder content type. [ericof]

  • Fix atct_album_view. [pbauer]

  • Removed dependency for collective.dexteritydiff since its features were merged into Products.CMFDiffTool. [pbauer]

  • Add test for behavior table_of_contents. [pbauer]

  • Add migration for blobnewsitems as proposed in [pbauer]

  • Require cmf.ManagePortal for migration. [pbauer]

  • Always migrate files and images to blob (fixes #26). [pbauer]

  • Add table of contents-behavior for documents. [pbauer]

  • Add versioning-behavior and it’s dependencies. [pbauer]

  • Remove image_view_fullscreen from the display-dropdown. [pbauer]

  • Enable selecting addable types on folders by default. [pbauer]

  • Fix reference-migrations if some objects were not migrated. [pbauer]

  • Keep the order references when migrating. [pabo3000]

  • Move templates into their own folder. [pbauer]

  • Moved migration related code to specific module. [gborelli]

  • Added migration Collection from app.collection to app.contenttypes. [kroman0]

  • Add missing i18n:attributes to ‘Edit’ and ‘View’ actions of File type. [saily]

  • Bind ‘View’ action to ${object_url}/view instead of ${object_url} as in ATCT for File and Image type. [saily]

  • Fixed installation of p.a.relationfield together with p.a.contenttypes. [kroman0]

  • Fixed creating aggregator of events on creating Plone site. [kroman0]

  • Added titles for menuitems. [kroman0]

  • Hide uninstall profile from @@plone-addsite. [kroman0]

  • Fix ‘ImportError: cannot import name Counter’ for Python 2.6. [timo]

  • Move XML schema definitions to schema folder. [timo]

  • Prevent the importContent step from being run over and over again. [pysailor]

  • Add build status image. [saily]

  • Merge (Tag: 2.0b5) into [timo]

  • Refactor p.a.collection robot framework tests. [timo]

1.0b1 (2013-01-27)

  • Added mime type icon for file. [loechel]

  • Lead image behavior added. [timo]

  • Make NewsItem use the lead image behavior. [timo]

  • SearchableText indexes added. [reinhardt]

  • Set the text of front-page when creating a new Plone. [pbauer]

  • Robot framework test added. [Gomez]

1.0a2 (unreleased)

  • Move all templates from skins to browser views. [timo]

  • User custom base classes for all content types. [timo]

  • Migration view (@@fix_base_classes) added to migrate content objects that were created with version 1.0a1. [timo]

  • Mime Type Icon added for File View. [loechel]

1.0a1 (unreleased)

  • Initial implementation. [pbauer, timo, pumazi, agitator]

Project details

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution (225.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page