Modify Collections to be folderish

Hello everyone, I have a question that is rather urgent.
I made Plone upgrade from 3.3. to 4.3 and now to 5.0.8, during migration I had warning regarding migration of topics. I have several of them that contain subtopics and as such I have 3 options: not to migrate them, delete them or make collections to be non-folderish. As of now, I left them without being migrated but now I need to get that content. Since I am not an expert or something for Plone, I am not quite sure how I can modify Collections to be folderish or create own folderish content-type. Can someone please provide me with more details that there are in * plone.app.contenttypes documentation https://docs.plone.org/external/plone.app.contenttypes/docs/README.html#migrating-topics . I have Plone installed in Windows server., Plone 508.
Regards,

what is use-case for a folderish collection?
why can't you create a folder, create a collection inside and make the collection the default content of the folder? Should be good enough!....everything else seems to be complicated

Regarding use case, I did a folderish collection for the category folders of a shop.
This way I can create product categories that contain (or not) articles that are filterable with collective.collectionfilter and can have more meaningful location in the site. These categories also work as prefiltered landing pages for certain campaigns and support mosaic layouts.

Don't know if that is useful in your case or better migrate them to normal collections. In any case the type configuration for my "Frankenstein-Collection" below.

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

    <!-- Basic properties -->
    <property
        i18n:translate=""
        name="title">Category</property>
    <property
        i18n:translate=""
        name="description"></property>

    <property name="allow_discussion">False</property>
    <property name="factory">Category</property>
    <property name="icon_expr">string:++plone++bootstrap-icons/folder.svg</property>
    <property name="link_target"></property>

    <!-- Hierarchy control -->
    <property name="allowed_content_types"/>
    <property name="filter_content_types">False</property>
    <property name="global_allow">True</property>

    <!-- Schema, class and security -->
    <property name="add_permission">plone.app.contenttypes.addFolder</property>
    <property name="klass">plone.dexterity.content.Container</property>
    <property name="model_file">plone.app.contenttypes.schema:folder.xml</property>
    <property name="model_source"></property>
    <property name="schema"></property>

    <!-- Enabled behaviors -->
    <property name="behaviors" purge="false">
        <element value="plone.basic"/>
        <element value="plone.richtext"/>
        <element value="plone.collection"/>
        <element value="plone.categorization"/>
        <element value="plone.relateditems" />
        <element value="plone.publication"/>
        <element value="plone.ownership"/>
        <element value="plone.namefromtitle" />
        <element value="plone.allowdiscussion" />
        <element value="plone.excludefromnavigation" />
        <element value="plone.shortname" />
        <element value="plone.constraintypes" />
        <element value="plone.nextprevioustoggle" />
        <element value="plone.layoutaware" />
    </property>

    <!-- View information -->
    <property name="add_view_expr">string:${folder_url}/++add++Category</property>
    <property name="default_view">gallery_listing</property>
    <property name="default_view_fallback">False</property>
    <property name="immediate_view">view</property>
    <property name="view_methods">
        <element value="gallery_listing"/>
        <element value="album_view"/>
        <element value="event_listing"/>
        <element value="full_view"/>
        <element value="listing_view"/>
        <element value="summary_view"/>
        <element value="tabular_view"/>
        <element value="layout_view"/>
    </property>

    <!-- Method aliases -->
    <alias
        from="(Default)"
        to="(dynamic view)"
    />
    <alias
        from="edit"
        to="@@edit"
    />
    <alias
        from="sharing"
        to="@@sharing"
    />
    <alias
        from="view"
        to="(selected layout)"
    />

    <!-- Actions -->
    <action
        action_id="view"
        category="object"
        condition_expr=""
        i18n:attributes="title"
        title="View"
        url_expr="string:${object_url}"
        visible="True">
        <permission value="View"/>
    </action>
    <action
        action_id="edit"
        category="object"
        condition_expr=""
        i18n:attributes="title"
        title="Edit"
        url_expr="string:${object_url}/edit"
        visible="True">
        <permission value="Modify portal content"/>
    </action>

    </object>

I refactored plone.app.collection to make the Collection type a behavior. Specifically for the use case of folderish collections (because we had this use case for a German newspaper website). I don't recall all the details but it should be as easy as creating a new folderish Collection type that has the collection-behavior (not sure how it is actually called) enabled.

1 Like

Plone Foundation Code of Conduct