layout_paragraphs_disable_duplicate
Hides the duplicate button for selected paragraph types in the Layout Paragraphs builder. Use it when duplication causes issues or when certain types should not be duplicated.
Features
The module adds per-paragraph-type control: you choose exactly which paragraph types have the duplicate control hidden; other types are unchanged. Configuration lives under Configuration > Content > Layout Paragraphs settings as a Disable Duplicate tab. No code or theme changes are needed—enable the module, pick types in the form, and save. It applies in the standard Layout Paragraphs UI and in any editor that uses it (e.g. Mercury Editor).
When to use it:
- A paragraph type has bugs or odd behavior when duplicated (e.g. view mode or style only updating after save), and you want to disable duplicate until that is fixed.
- Certain paragraph types (e.g. manual listings, complex components) should not be duplicated for editorial or UX reasons.
- You want a single place to control which types can be duplicated without patching or custom code.
Post-Installation
After installing, go to a config page—no new content types or text formats are added.
- Enable the module: Go to Extend, find Layout Paragraphs Disable Duplicate, enable it, and install.
- Configure which types hide duplicate: Go to Configuration > Content > Layout Paragraphs settings, open the Disable Duplicate tab (or go directly to
/admin/config/content/layout_paragraphs/disable-duplicate), check the paragraph types for which the duplicate control should be hidden, and click Save configuration. - Result: In the Layout Paragraphs builder (and in Mercury Editor or other editors using it), components of the selected paragraph types will no longer show a Duplicate button. Edit, Delete, drag, and reorder are unchanged.
Additional Requirements
Beyond Drupal core (10 or 11), this project requires:
- Paragraphs (required)
- Layout Paragraphs (required)
No external APIs or non-Drupal libraries are required.
Recommended modules/libraries
Mercury Editor: If you use Mercury Editor for page building, this module's settings apply there as well; duplicate will be hidden for the same paragraph types you configure.
Similar projects
Layout Paragraphs does not ship a way to disable duplicate per paragraph type. This module fills that gap with a single config form and no custom code in your theme or other modules. Other approaches (e.g. hiding the button with CSS or customizing the builder UI) require more maintenance; this module uses Layout Paragraphs' existing access control so the duplicate link is not rendered at all for selected types.
Supporting this Module
If you find this module useful, consider contributing back: issue reports, patches, or documentation on the project issue queue help keep it maintained.
Additional information: Configuration is stored in layout_paragraphs_disable_duplicate.settings under the key disabled_paragraph_types (a list of paragraph type machine names). The module does not alter permissions; it only affects whether the duplicate control is shown. Users who can edit the layout can still add new components of the same type; they just cannot duplicate existing ones for the types you disable.