From f53de2a4dc9f46f64876ee7b44c0da3b66344b2b Mon Sep 17 00:00:00 2001 From: Vanessa Bedzra Date: Sat, 29 Nov 2025 18:53:19 +0000 Subject: [PATCH 1/2] djangocms-frontend/docs-328:Inconsistency in Documentation --- docs/source/how-to/extend-frontend-plugins.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/how-to/extend-frontend-plugins.rst b/docs/source/how-to/extend-frontend-plugins.rst index b835b596..1b6c7598 100644 --- a/docs/source/how-to/extend-frontend-plugins.rst +++ b/docs/source/how-to/extend-frontend-plugins.rst @@ -8,7 +8,7 @@ Existing components can be extended through two type of class mixins. ``djangocms-frontend`` looks for these mixins in two places: #. In the theme module. Its name is specified by the setting - ``DJANGOCMS_FRONTEND_THEME`` and defaults to ``djangocms_frontend``. + ``DJANGOCMS_FRONTEND_THEME`` and defaults to ``theme``. For a theme app called ``theme`` and the bootstrap5 framework this would be ``theme.frontends.bootstrap5.py``. @@ -233,9 +233,9 @@ Then, a new template is needed (in backdrop-filter: blur({{ instance.container_blur }}px); {% endif %}" {% endif %}> - {% if instance.image %} + {% if instance.container_image %}
Date: Sun, 30 Nov 2025 20:22:56 +0100 Subject: [PATCH 2/2] Improve clarity in extend-frontend-plugins documentation Updated formatting and wording for clarity in the documentation on extending frontend plugins. --- docs/source/how-to/extend-frontend-plugins.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/source/how-to/extend-frontend-plugins.rst b/docs/source/how-to/extend-frontend-plugins.rst index 1b6c7598..0b00ac22 100644 --- a/docs/source/how-to/extend-frontend-plugins.rst +++ b/docs/source/how-to/extend-frontend-plugins.rst @@ -4,8 +4,9 @@ How to extend built-in components ********************************** -Existing components can be extended through two type of class mixins. -``djangocms-frontend`` looks for these mixins in two places: +Existing components can be extended through **two type of class mixins**. +``djangocms-frontend`` tries to autodiscover them by looking for these mixins +in two places: #. In the theme module. Its name is specified by the setting ``DJANGOCMS_FRONTEND_THEME`` and defaults to ``theme``. @@ -32,7 +33,7 @@ The framework module is primarily thought to allow for adaptation of RenderMixins ============ -The render mixins are called "``*PluginName*RenderMixin``", e.g. +The render mixins are called "``RenderMixin``", e.g. ``AlertRenderMixin`` and are applied to the plugin class. This allows for the redefinition of the ``CMSPlugin.render`` method, especially to prepare the context for rendering. @@ -51,7 +52,7 @@ Form mixins are used to add fields to a plugin's admin form. These fields are available to the render mixins and, of course, to the plugin templates. -Form mixins are called "``*PluginName*FormMixin``", e.g. ``AlertFormMixin`` and are +Form mixins are called "``FormMixin``", e.g. ``AlertFormMixin`` and are applied to the editing form class. Form mixins are a subclass of ``entangled.EntangledModelFormMixin``. @@ -62,8 +63,8 @@ applied to the editing form class. Form mixins are a subclass of single: Create a theme single: Themes -Working example -=============== +Working example: Extending the ``GridContainerPlugin`` +====================================================== Let's say you wanted to extend the ``GridContainerPlugin`` to offer the option for a background image, and say a blur effect. The way to do it @@ -313,6 +314,5 @@ information will be preserved. import ``CMSUIPlugin`` (import from ``djangocms_frontend.cms_plugins``) as base class for the plugins. - * Create ``models.py`` - file for the models (which need to be proxy models of ``FrontendUIItem`` - (import from ``djangocms_frontend.models``). + * Create ``models.py`` file for the models (which need to be proxy models + of ``FrontendUIItem`` (import from ``djangocms_frontend.models``).