Working with Extensions
Overview
Any YAML-configured asset (Views and Knowledge Models) can use the Base-Extension mechanism to quickly reuse configurations and keep an ongoing link.
Basics
An extension uses a base to reuse all content of the base if the specific configuration is not overwritten within the Extension.
The basic interactions are to overwrite or scope out a list item of a configuration.
Each list item needs to be identified by an id. (A list is anything that has a "-" in front of it).
Examples
Exchanging a component (ABC → CDE)
Base
layout: rows: - id: row1 columns: - id: column1 componentId: ABC - id: row2 columns: ...
Extension
layout: rows: - id: row1 columns: - id: column1 componentId: CDE
Extension
layout: rows: - id: row1 columns: - id: column1 componentId: CDE - id: row2 columns: ...
Hide/remove items from the Base
If in your Extension you want to remove a list item defined in the Base, you can use scope: hidden to remove it. (The term "disabled", as well as HIDDEN and DISABLED, are also possible, but please use "hidden")
Note
Inside Knowledge Models, to hide something you need to use scope: disabled. 'Hidden' is not supported inside the Knowledge Model.
Base
layout: rows: - id: row1 columns: - id: column1 componentId: ABC - id: row2 columns: ...
Extension
layout: rows: - id: row1 scope: hidden
Extension
layout: rows: - id: row2 columns: ...
Make elements and configurations immutable
If you define an item as immutable, it is not able to be changed in the Extension.
Note
Currently, only the level where scope: immutable is set is secured to not be changed (if you make a Dropdown list immutable on the highest component level, you can still add more dropdowns to the list).
Base
- id: row1 removePadding: true scope: immutable columns: []
Extension
- id: row1 removePadding: false columns: []
Extension
- id: row1 removePadding: true columns: []