You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Sample descriptor:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<partxmlns="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>
The text was updated successfully, but these errors were encountered:
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
changed the title
Enable filtering parts and layouts by content type
Enable filtering page component descriptors by content type
Apr 13, 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.
Sample descriptor:
The text was updated successfully, but these errors were encountered: