Document how to apply conditions to your own extension types #21629
Replies: 1 comment 1 reply
-
|
Good question, and I understand that it can be tricky. Lets see if these pointers will work for you. 1. Get the Typings right for your Manifest Type. 2. Initialize the extensions with condition handling. For the workspace info apps, the implementation looks like this: or for multiple types: Notice if your extension type both brings an **3. Customizing extension rendering ** Example you can add the There is also an option to declare a filter-method, which can be used to only show some of the extensions of the given type/types. You can also parse props, properties that will be set on the element: <umb-extension-slot
type="searchResultItem"
.props=${{ item: searchResult }}>
</umb-extension-slot>I hope this will work for you, good luck :-) As part of this answer I appended JS Docs, to the two elements, hopefully improving the knowledge for everyone moving forward. As a thanks, I will appriciate if you bring your new knowledge as a contribution to the Umbraco Docs. Also, please feel free to use the discussion on how to improve on this matter so future users can have a better experience with this, but if you feel it is resolved, please close the discussion :-) Huge thanks in advance |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It has been documented how to create your own conditions.
It is however not documented how to support conditions for your custom types.
Eg. I made a custom type which can be retrieved with the
extensionRegistry. I would however like to add support for a conditions-array, so I could - for example - conditionally render a list of items, which can also update itself if a condition later sets itself tothis.permitted = true.I've tried looking through the source, but I can't seem to link it all together.
@nielslyngsoe Could you perhaps point me in the right direction?
Beta Was this translation helpful? Give feedback.
All reactions