Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable configuring allowed child content types #8693

Closed
alansemenov opened this issue Mar 4, 2021 · 0 comments
Closed

Enable configuring allowed child content types #8693

alansemenov opened this issue Mar 4, 2021 · 0 comments
Assignees
Milestone

Comments

@alansemenov
Copy link
Member

alansemenov commented Mar 4, 2021

Part and Layout descriptors are currently not filtered in any way. When users select a descriptor for a new part, they always get the entire list of parts available in the application, even if they always use only a handful of parts in this specific content type.

To simplify this we will support filtering of part and layout descriptors by content type. Allowed content types can be specified inside a part or layout descriptor schema via regular expressions. Descriptors with a content type constraint should be matched against content type specified in API request sent from the client and filtered out if they are not allowed for the specified content type.

image

Sample descriptor:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<part xmlns="urn:enonic:xp:model:1.0">
  <display-name>My cool layout</display-name>
  <config>
    <allow-on-content-type>landing-page</allow-on-content-type> // only for content type `landing-page` and...
    <allow-on-content-type>${app}:*</allow-on-content-type> // ...for content types in this application
  </config>  
  <form>
    ...
  </form>
</part>

@alansemenov alansemenov changed the title Support filter by content type for part and layout in descriptors Enable filtering parts and layouts by content type Mar 4, 2021
@alansemenov alansemenov changed the title Enable filtering parts and layouts by content type Enable filtering page component descriptors by content type Apr 13, 2021
@rymsha rymsha added this to the 7.7.0 milestone Apr 27, 2021
@alansemenov alansemenov changed the title Enable filtering page component descriptors by content type Enable configuring allowed child content types Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants