Add setting to limit what paragraph types can be in section layouts.

Created on 20 August 2020, over 4 years ago
Updated 4 July 2023, over 1 year ago

Problem/Motivation

Right now, there are only two "categories" of paragraphs in a layout paragraphs formatted field: layout and content.

It's also possible to say that ALL content must be inside layout sections.

But it's possible that some content paragraph types would not be appropriate in layout sections. The only way currently to prevent them from appearing as options within a layout section is to disable section nesting and make those paragraph types layout sections. That's really confusing to the user though. A paragraph type like view embed may not work within a section type of columns, but that doesn't mean that editors should be able to add paragraphs inside the view embed paragraph type.

I'd like to propose another setting per paragraph type: exclude from layout sections. With that setting, certain paragraph types that are inappropriate within layout sections but are not layout sections themselves could be added only at the top level.

🌱 Plan
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jastraat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡­πŸ‡ΊHungary nagy.balint

    I made a quick module for the subscriber: Layout Paragraphs Limit β†’
    any contributions are welcome.

  • πŸ‡­πŸ‡ΊHungary nagy.balint

    Now I added the registerLpbMoveError to module in #31, it seem to work, but I only done minimal testing.

    However none of the error messages are displaying for me (including the built in layout paragraphs ones) maybe it is something that was not implemented yet in the main module?

  • πŸ‡¦πŸ‡ΉAustria hudri Austria

    The Layout paragraphs limit β†’ module made a some progress in the last few days, here is a screenshot of the current dev branch:

    The dev branch already works pretty well IMO, it lacks tests though.

    I'm currently working on a numeric limit per region. An initial draft is done, but the Duplicate button doesn't seem to emit any event. Wasn't necessary as long as only bundle types were checked, but a numeric limit doesn't seem to be possible with the current API.

Production build 0.71.5 2024