Skip to main content

collective.contentsections

PyPI Python Version License Status Stars

This product offers a block approach for Plone 6 Blicca based entirely on Dexterity content types. It is largely based on the code that was developed in the imio.smartweb.core product for the Walloon municipalities.

The approach in this product can be seen as a generalisation of the Full content view available in Plone on Folder content type.

The Plone site is seen as a folder hierarchy that contains pages. A page is a folderish content type composed of sections. A section can contain elements of the same type (File, Image, Link, Location, Contact). Folders, pages, sections, and elements are all Dexterity content types.

The section view redirects to its position in its parent page view. Section content types are hidden from research, but their contents are indexed in the SearchableText index of their parent page.

Images and files are seen as elements. Images are only available in image sections and as the lead image in all content types. Files are only available in file sections. Links are sometimes seen as elements of the links section and sometimes as redirect pages.

Here is a picture of the model.

Archimate Model

Compatibility

  • Releases 1.x of collective.contentsections are for Plone 6.0
  • Releases 2.x of collective.contentsections are for Plone 6.1

Features

This product provides:

  • Basic schema and class for section content types
  • LeadIcon vocabulary and behavior based on plone.icons registry records
  • collective.taxonomy.section_css_classes taxonomy for available section CSS classes
  • TextSection which contains a simplified TinyMCE field and the behavior LeadImage. A TextSection contains only the lead image. No more image in TinyMCE text field.
  • HTMLSection to integrate iframe from YouTube, Google Maps, and other iframe providers. No more video or iframe in TinyMCE text field.
  • CollectionSection to link a section with a collection.
  • SelectionSection to link a section to other pages. The SelectionSection replaces the Related items behavior.
  • CardsSection content type based on a collective.z3cform.datagridfield field to make nice information blocks/links on a page.
  • ImagesSection, LinksSection, FilesSection, LocationsSection, ContactsSection folderish section content types to keep the site structured and facilitate the cut and paste of sections between pages.
  • A Page view for folderish content types.
  • BasicPage, EventPage, and NewsPage page content types to replace default Plone content types.

This product fits Plone with:

  • A new default page name index.
  • LeadImage on File and Link content types.
  • A profile to simplify the TinyMCE interface.

Demo Content

The collective.contentsections product adds a plone.distribution "Plone Site (Content Sections)" with some demo pages.

Choices/Beliefs

  • We want a KISS solution.
  • We want a solution for junior integrators.
  • We believe that Plone Blicca can be used to create beautiful sites in less than a day.

Possibilities

  • If you activate workflow on sections, you can restrict access to certain sections of a page.
  • As sections are Dexterity content types, you can create a collection/faceted navigation of sections.

Dependencies

This product depends on the following products: collective.taxonomy, collective.z3cform.datagridfield, collective.geolocationbehavior

Installation

Install collective.contentsections by adding it to your buildout:

[buildout]
...

eggs =
    collective.contentsections

and then run bin/buildout.

Development

Prerequisites

uv

See installation guide )

Environment initialization

git clone git@github.com:collective/collective.contentsections.git
cd collective.contentsections
make install
make start

Tests

Tests are located inside tests folder. They can be run with tox.

make test
make coverage
make lint

Internationalization

This product has been translated into:

  • English
  • French

To add a new language, you need a "PO file" inside the locales folder.

For example, to add German locales:

mkdir -p src/collective/collective.contentsections/locales/de/LC_MESSAGES
touch src/collective/collective.contentsections/locales/de/LC_MESSAGES/collective.contentsections.po

After that, you can update the file with:

make i18n

You will need to change Language-Code and Language-Name directives in the file.

Credits

Most ideas developed in this product come from people who worked at iMio on the imio.smartweb product family during the year 2021. This team was composed of:

  • Christophe BOULANGER
  • Elisabeth DONNAY
  • Thomas LAMBERT
  • Laurent LASUDRY
  • Olivier SNICKERS
  • Sébastien VERBOIS

Previews

Preview 1

Preview 2

Contributors

Changelog

2.3.0 (2026-09-03)

  • Fix the list of addable sections when a page is the default page for its folder. [sverbois]

2.3.0a1 (2026-09-02)

  • Add "+" buttons between sections to create a new section directly from the page. The new section is automatically moved right after the section the "+" button was attached to. This is made possible by customising the default section add form. [sverbois]
  • Add preview toggle for editors on pages. [sverbois]

2.2.0a1 (2026-09-01)

  • Add QuerySection, a new section content type using the plone.collection behavior to define its own search query. [sverbois]

2.1.0a1 (2026-08-31)

  • Replace ITextSection lead_image_scale with lead_image_width (Bootstrap grid columns). Add a column_view (image next to the text, now the default view) and adapt the existing view to this new width, renamed float_view. Add an upgrade step (profile version 1001) migrating existing lead_image_scale values to lead_image_width. [sverbois]

2.0.0a5 (2026-08-31)

  • Remove hr, noneditable and paste TinyMCE plugins. They are now in TinyMCE 7 Core. [sverbois]
  • Fix Unauthorized Error in CardsSection and SelectionSection. [sverbois]
  • Add option 5 to the IBaseGroupSection group size options. [sverbois]
  • Use a maximum of 3 cards at the large breakpoint and centre-align the content for the last incomplete line on card view. [sverbois]
  • Add missing xml profile configuration for Folder content type. [sverbois]

2.0.0a4 (2025-06-21)

  • Add pre-commit to development environment. [remdub]
  • Increase test coverage to 100%. [remdub]
  • Use Select2FieldWidget instead of SelectFieldWidget in ICard. [sverbois]
  • Fix ZCML includes [ale-rt]
  • Fix TinyMCE plone.menu registry setting. TinyMCE plone.menu is not longer a list, it's now a text. Plone 6.1.2 is now the minimal version for collective.contentsections. [sverbois]

2.0.0a3 (2025-04-30)

  • Fix typos in card.pt and macros.pt template. [remdub]
  • Enable i18ndude pre-commit checks. [remdub]

2.0.0a2 (2025-04-29)

  • Implement UV for managing Python environment and dependencies. [remdub]
  • Introduce pytest as the testing framework. [remdub]
  • Add plone/meta for GitHub Actions CI/CD integration. [remdub]
  • Configure Tox to launch tests across multiple environments. [remdub]
  • Integrate i18n/locales support for improved internationalization and localization. [remdub]

2.0.0a1 (2025-03-19)

  • Use Plone 6.1 and Python 3.12 in development buildout. [sverbois]
  • Remove portal_properties access. [sverbois]
  • Add a plone.distribution with demo content. [sverbois]
  • Update TinyMCE registry profile to TinyMCE 7. [sverbois]
  • Remove import deprecation warning. [sverbois]
  • Use h-100 class on cards section. [sverbois]
  • Disable AjaxSelectFieldWidget on relation_uid field of cards section (Not working on Plone 6.1). [sverbois]

1.0.0a22 (2024-02-06)

  • Remove bootstrap carousel ride. [sverbois]
  • Use h-100 class on card macro. [sverbois]
  • Add Section primary/secondary/black items to section_css_classes taxonomy. [sverbois]
  • Change element view view to redirect to parent folder_contents view. [sverbois]

1.0.0a21 (2023-12-31)

  • Fix date isoformat in collection section. [sverbois]

1.0.0a20 (2023-12-31)

  • Fix end_date field in selection view. [sverbois]
  • Improve Bootstrap card component with bigger titles, publication date and event dates. [sverbois]
  • Improve section ordering drag and drop. [sverbois]

1.0.0a19 (2023-12-25)

  • Add content type icons. [sverbois]
  • Sort sections by position in parent. [sverbois]
  • Hide Plone toolbar on Spotlight.js view. [sverbois]

1.0.0a18 (2023-08-23)

  • Disable workflow on ContactsSection and Contact content type. [sverbois]
  • Fix empty Locations section with zoom value. [sverbois]

1.0.0a17 (2023-08-19)

  • Add Contacts section and Contact content type. [sverbois]

1.0.0a16 (2023-08-19)

  • Add Locations section and Location element base on pat-leaflet. [sverbois]
  • Modify content type names to avoid confusion with Plone's default content types. [sverbois]
  • Add plone.formwidget.geolocation >= 3.0.5 dependency. [sverbois]
  • Add a Javascript workaround to fix "Add item to default page". [sverbois]
  • Use Python 3.11 and Plone 6.0.6 in development buildout. [sverbois]
  • Add NewsPage content type. [sverbois]

1.0.0a15 (2023-01-01)

  • Use Plone 6 final in development buildout. [sverbois]
  • Transform internal (resolveuid) links before rendering LinksSection. [sverbois]

1.0.0a14 (2022-12-11)

  • Set load_defer key to True for resource bundles. [sverbois]
  • Use Plone 6 beta 3 in development buildout. [sverbois]
  • Update TinyMCE registry profile to TinyMCE 5. [sverbois]
  • Add a shortcut in actions menu to add content in sections. [sverbois]
  • Use "Card view" as default view for "Images section". [sverbois]
  • Move "group_size" field to "default" fieldset. [sverbois]

1.0.0a13 (2022-08-21)

  • Add a CSS class on each section with the section view template id. [sverbois]
  • Add a hide_item_titles field on links sections. [sverbois]
  • Allow "Group size" of 6 items. [sverbois]
  • Add control buttons and optional title section on card and carousel templates. [sverbois]

1.0.0a12 (2022-08-16)

  • Remove customized plone.allowed_sizes and plone.toolbar_position configurations. [sverbois]
  • Set boolean fields required option to False. [sverbois]
  • Require version 3 of collective.taxonomy and collective.z3cform.datagridfield. [sverbois]
  • Improve CSS for section full-width management and card section edition. [sverbois]

1.0.0a11 (2022-03-26)

  • Add hide_title field on IPage. [sverbois]

1.0.0a10 (2022-03-26)

  • Allow BasicPage as default page type. [sverbois]
  • Remove layout name in item_lead_image_scale method. [sverbois]

1.0.0a9 (2021-12-30)

  • Allow Python 3.7 as Plone 6. [sverbois]
  • Use Plone 6 alpha 2 in development buildout. [sverbois]

1.0.0a8 (2021-12-22)

  • Use a collective.taxonomy to manage the available section CSS classes. [sverbois]

1.0.0a7 (2021-12-22)

  • Add model Archimate view. [sverbois]
  • Remove remote_url field on CardsSection. We can use the relation_uid field with a Link content. [sverbois]
  • Add a Card carousel view on sections. [sverbois]
  • Add container width option on sections. [sverbois]

1.0.0a6 (2021-12-20)

  • Use pat-sortable pattern to reorder sections in a page using drag and drop. [sverbois]

1.0.0a5 (2021-12-19)

  • Remove the use of accordion in edit forms. [sverbois]
  • Remove the row prototype. We want a KISS product. [sverbois]

1.0.0a4 (2021-12-19)

  • Add tags information in section view which contains context subjects field value. [sverbois]
  • Clean up the list of behaviours on content types. [sverbois]
  • Don't hide contentleadimage viewlet. [sverbois]

1.0.0a3 (2021-12-18)

  • Add a demo.json export of collective.exportimport with demo pages. [sverbois]
  • Clean use of default and missing_value field attributes. [sverbois]

1.0.0a2 (2021-12-17)

  • Add Event Page portal type. [sverbois]

1.0.0a1 (2021-12-17)

  • Initial release [sverbois]

Metadata

Release files for collective.contentsections 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.contentsections 2.3.0
File Size Uploaded
collective_contentsections-2.3.0.tar.gz 5.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for collective.contentsections 2.3.0
File Interpreter ABI Platform
collective_contentsections-2.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 MB

Release files / collective_contentsections-2.3.0.tar.gz

Download URL collective_contentsections-2.3.0.tar.gz
Size 5.5 MB
Tags Source
SHA-256 checksum
How to use checksums
cb0e550e3d3d4b074734d98c3eebddf5afe47f96188579c2d9316d4d46752102
BLAKE2b-256 checksum
How to use checksums
365e0e6d17f99757695efef0b5580a392a2d5fb81b8251f51a00323ff87c612d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / collective_contentsections-2.3.0-py3-none-any.whl

Download URL collective_contentsections-2.3.0-py3-none-any.whl
Size 5.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e6069dabe100384cc742935d87985c3bbd8ab218597ee8d3b2ebfb095fed9a82
BLAKE2b-256 checksum
How to use checksums
f43a2469ee1f90199e5b78ca5ef0c39f58cbf2c63be58f6ad293edb3b17deceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page