plone.app.contenttypes 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 plone.app.event)

Collection

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).

If you have a Plone site with mixed Archetypes and Dexterity content use the extra requirement atrefs.

eggs=
...
plone.app.contenttypes [atrefs]

This will also install the package plone.app.referenceablebehavior that allows you to reference dexterity-based content from archetypes-based content. You will have to enable the behavior plone.app.referenceablebehavior.referenceable.IReferenceable for all types that need to be referenced by Archetypes-content.

If you install plone.app.contenttypes 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 plone.app.contenttypes removes the type-definitions for the old default-types like this:

<objectname="Document"remove="True"/>

They are then replaced by new Definitions:

<objectmeta_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 plone.app.contenttypes (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 plone.app.contenttypes 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 plone.app.contenttypes 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 plone.app.contenttypes will not be editable until you reinstall plone.app.contenttypes.

plone.app.dexterity >= 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 plone.app.contenttypes uses behaviors for the richtext-fields.

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

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

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. plone.app.contenttypes.interfaces.IDocument). To fix this you can call the view /@@fix_base_classes on your site-root.

Since plone.app.contenttypes 1.1a1, the Collection type uses the new Collection behavior and the Event type utilizes behaviors from plone.app.event. In order to upgrade:

First run the default profile (plone.app.contenttypes:default) or reinstall plone.app.contenttypes

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.

Custom content-types will not be touched by the migration plone.app.contenttypes and will continue to work as expected.

Future versions of plone.app.contenttypes will have with a form that allows you to migrate old custom Archetypes-content to Dexterity (you’ll have to create the Dexterity-types before) .

However if you’d like to migrate your content-types to Dexterity before this feature is completed you might want to have a look at the code of plone.app.contenttypes.migration.migration.NewsItemMigrator as a blueprint for a migration.

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 at all but only use behaviors to provide their fields.

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.

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.

Add form to install pac and forward to dx_migration
after a successful migration to Plone 5
[pbauer]

Rename atct_album_view to folder_album_view.
[pbauer]

Do a better check, if LinguaPlone is installed, based on the presence of the
“LinguaPlone” browser layer. Asking the quick installer tool might claim it’s
installed, where it’s not.
[thet]

Register folderish views not for plone.app.contenttypes’ IFolder but for
plone.dexterity’s IDexterityContainer. Now, these views can be used on any
folderish Dexterity content.
[thet]

Add a ICustomMigrator interface to the migration framework, which can be used
to register custom migrator adapters. This can be useful to add custom
migrators to more than one or all content types. For example for
schemaextenders, which are registered on a interface, which is provided by
several content types.
[thet]

In the migration framework, fix queries for Archetype objects, where only
interfaces are used to skip brains with no or Dexterity meta_type. In some
cases Dexterity and Archetype objects might provide the same marker
interfaces.
[thet]

Add logging messages to content migrator for more verbosity on what’s
happening while running the migration.
[thet]

Use Plone 4 based @@atct_migrator and @@atct_migrator_results template
structure.
[thet]

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]

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 plone.app.referenceablebehavior, 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]