Skip to content

Limit Amount of a Widget Type in an Area #4655

@LeviticusMaximus

Description

@LeviticusMaximus

I know I can limit the number of widgets in an area with

main: {
  type: 'area',
  options: {
    widgets: {
      '@apostrophecms/rich-text': {},
      '@apostrophecms/image': {},
      '@apostrophecms/video': {}
    },
    max: 3
  }
}

but is there any way to limit the amount of any specific widget in that area? e.g.

main: {
  type: 'area',
  options: {
    widgets: {
      '@apostrophecms/rich-text': {},
      '@apostrophecms/image': {},
      '@apostrophecms/video': {
          max: 1 // 👈 this puppy here means only one video widget in this area
      }
    },
    max: 3
  }
}

I know I could make another area, but the order of areas in the page is still fixed; this feature would allow users to re-organise the area content avoiding this fixed-layout problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions