Override property inherited from composition #12967
Replies: 2 comments
-
This would be really helpful in some cases, for example, when recommended image sizes are different for different doc types (and their templates), it would be useful to set a specific label for each case but still inheriting a standard "Image" property as part of a standard set of properties for a page. |
Beta Was this translation helpful? Give feedback.
-
I also had a use-case from a base block (composition or inherited), with a "Reference" property using MNTP. Perhaps not possible to override property editor complety, but it would be nice to be able to modify configuration as long it doesn't affect return type. E.g. on Block A a MNTP to pick teacher node type, on Block B a MNTP a pick student node type and on Block C a MNTP school node type. In all cases the property editor is single/multi picker. |
Beta Was this translation helpful? Give feedback.
-
Compositions are great as building blocks and benefits when using ModelsBuilder as interfaces are generated. So it is easy to pass in the the model to a partial and check the current page has the composition.
E.g.
However a limitation of this is that properties like label, description and setting to property to mandatory is also inherited.
Maybe we can't change part of the inherited properties like datatype and alias, but it would be useful to override label and description to customize this to the specific page type or e.g. set the property as mandatory, while it shouldn't be mandatory on another page.
Beta Was this translation helpful? Give feedback.
All reactions