Skip to main content

A new addon for Plone

Project description

cs_dynamicpages

A new addon for Plone to create web-based dynamic pages.

Full Documentation

The concept is pretty similar that of Volto blocks:

  • You can build a page using reusable items.
  • Each item can have different fields
  • Each item can have different views

Provided Content Types

  • DynamicPageFolder: this content type will be created in a given folder, and will be the container where all the rows will be added.

  • DynamicPageRow: this content type will be the one that will be rendered in a separate row in the view

  • DynamicPageRowFeatured: this content type can be used to save static information that can be shown in a row. For instance: each of the items of a slider need a title, a description or an image. They can be added using this content-type

Provided View

There is just one view dynamic_view registered for Folders and Naviation roots. You can register it for your own content-types also.

Different fields

To provide different fields, you should register standard behaviors to the DynamicPageRow content type.

Custom views

To provide different views, you should register standard views (using zcml).

Those views must be registered for implementers of cs_dynamicpages.content.dynamic_page_row.IDynamicPageRow and their name must start by cs_dynamicpages-.

Restrict fields in the row edit view

You may register several behaviors for DynamicPageRow objects but only use some of the fields provided by them in a given view.

You can restrict which fields are shown in the edit form of the DynamicPageRow going to the Dynamic Pages Controlpanel, and setting there the list of fields that will be shown when editing each of the row types.

To ease installation of such views and field configuration in your products, cs_dynamicpages.utils contains 2 utility functions:

  • add_custom_view: function to add a given view to the list of available row types
  • enable_behavior: function to enable the given behavior in the DynamicPageRow content type

Templates

The product lets the end-user save a given dynamic page as a "Template". This means that a reference to the rows setup of a given page will be saved and then can be used as an starting point when creating a new dynamic page.

Templates are saved in a JSON field of a behavior called cs_dynamicpages.templates in a content object. This behavior is applied, by default, to the Plone Site object. But can be applied to any other object.

The template manager goes up in the contentree from the context object where you are setting the template until it finds a content object that implements the said behavior, and saves the template information there.

This means that you can configure different templates in different parts of your site, provided that you set the said behavior to a given content-type. Think, for instance, that you could set the behavior to Subsites of your site, or to Language Root Folders in multilingual sites.

A template management screen is also available to view and delete such templates.

Installation

Install cs_dynamicpages with pip:

pip install cs_dynamicpages

And to create the Plone site:

make create-site

Contribute 🤝

Please, clone this repo, do your developments in a specific branch, and create a pull request from it.

Prerequisites ✅

Installation 🔧

  1. Clone this repository, then change your working directory.

    git clone git@github.com:codesyntax/cs_dynamicpages.git
    cd cs_dynamicpages
    
  2. Install this code base.

    make install
    

Add features using plonecli or bobtemplates.plone

This package provides markers as strings (<!-- extra stuff goes here -->) that are compatible with plonecli and bobtemplates.plone. These markers act as hooks to add all kinds of subtemplates, including behaviors, control panels, upgrade steps, or other subtemplates from plonecli.

To run plonecli with configuration to target this package, run the following command.

make add <template_name>

For example, you can add a content type to your package with the following command.

make add content_type

You can add a behavior with the following command.

make add behavior
You can check the list of available subtemplates in the [`bobtemplates.plone` `README.md` file](https://github.com/plone/bobtemplates.plone/?tab=readme-ov-file#provided-subtemplates).
See also the documentation of [Mockup and Patternslib](https://6.docs.plone.org/classic-ui/mockup.html) for how to build the UI toolkit for Classic UI.

License

The project is licensed under GPLv2.

Credits and acknowledgements 🙏

Generated using Cookieplone (0.9.7) and cookieplone-templates (4d55553) on 2025-07-17 11:59:12.982862. A special thanks to all contributors and supporters!


Changelog

1.0.0b14 (2026-06-18)

New features:

  • Sort vocabulary values @erral

Bug fixes:

  • Fix the registration documentation @erral

1.0.0b13 (2026-05-12)

New features:

  • Register add-row-position JS bundle @libargutxi #31

Bug fixes:

  • Remove action on uninstalling @erral

1.0.0b12 (2026-05-04)

Internal:

  • Use newly created object directly without having to find it @erral #29

1.0.0b11 (2026-04-14)

New features:

  • Render README and CHANGELOG in pypi readme @erral

Bug fixes:

  • Minor styling fixes @libargutxi

1.0.0b9 (2026-03-25)

Internal:

  • Add llms plugin for documentation @erral
  • Add tests for documentation how-tos @erral
  • Fix docs base url @erral

1.0.0b8 (2026-03-23)

New features:

  • dynamically set the value of the related Image, checking the TinyMCE control panel @erral #24

Internal:

  • Add documentation @erral

1.0.0b7 (2026-03-20)

New features:

  • Add tests @erral

Bug fixes:

  • Return false if trying to add a view that exists to the registry @erral
  • Translate comments @erral

1.0.0b6 (2026-03-12)

New features:

  • Style the template handling actions @libargutxi #20

1.0.0b5 (2026-03-11)

New features:

  • Add row marker CSS classes @erral #10
  • Add template handling @erral

Bug fixes:

  • Change the id for the content wrapping div @erral #9
  • Add name to the body-class adapter not to clash with other existing adapters @erral

Internal:

    • Fix and expand test coverage: fix pre-existing placeholder tests, add tests for utils, indexers, upgrade steps, behaviors, vocabularies, control panel and browser components @erral

1.0.0b4 (2025-11-10)

New features:

    • Add icons to views @libargutxi
    • Add row spacing configuration @libargutxi
    • Add behavior to set fetchpriority/loading attributes to images @libargutxi
    • Complete translations @erral #7

1.0.0b3 (2025-10-17)

New features:

  • Add more javascript code to the frontend @libargutxi #5
  • New configuration options @libargutxi

1.0.0b2 (2025-10-08)

New features:

  • Publish created rows folder @libargutxi #4

1.0.0b1 (2025-10-08)

Internal:

  • Initial release @codesyntax

Project details


Download files

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

Source Distribution

cs_dynamicpages-1.0.0b14.tar.gz (161.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cs_dynamicpages-1.0.0b14-py3-none-any.whl (185.3 kB view details)

Uploaded Python 3

File details

Details for the file cs_dynamicpages-1.0.0b14.tar.gz.

File metadata

  • Download URL: cs_dynamicpages-1.0.0b14.tar.gz
  • Upload date:
  • Size: 161.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for cs_dynamicpages-1.0.0b14.tar.gz
Algorithm Hash digest
SHA256 e0b5e559a15bb8435b8b4f3e5bd79a423ed8a893d3bdd0605f18c716c4fff15e
MD5 5d734e7aaa945429b7827a32ee7a0894
BLAKE2b-256 17c9d79a18fa51cc2b1334647ff2520ea17b6f63859dab80e3739d3905e592a2

See more details on using hashes here.

File details

Details for the file cs_dynamicpages-1.0.0b14-py3-none-any.whl.

File metadata

File hashes

Hashes for cs_dynamicpages-1.0.0b14-py3-none-any.whl
Algorithm Hash digest
SHA256 5bf8677e82145b603424668f7ef023bc2cccee55213ac0474011da5cf7667fd1
MD5 58d7b17bc5222b22286ca45b61340efd
BLAKE2b-256 6d0903030bf162662e54948f45555d22fa6cb1a90a086d03a5fcf2afd7936615

See more details on using hashes here.

Supported by

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