@@ -17,7 +17,8 @@ You can also refer to the tutorial [Custom Views for Block List](https://docs.um
17172 . Configure at least one Block Type on the Block Editor.
18183 . Ensure the Element Type of the Blocks Content Model has a property using ` headline ` as the Property Alias.
19194 . Take note of the Element Type Alias as you will use that in the next step.
20- 5 . Add the following code to the ` umbraco-package.json ` file:
20+ 5 . Create a Settings Model for the above Element Type and add a property with alias ` theme ` .
21+ 6 . Add the following code to the ` umbraco-package.json ` file:
2122
2223{% code title="umbraco-package.json" %}
2324``` json
@@ -32,7 +33,7 @@ You can also refer to the tutorial [Custom Views for Block List](https://docs.um
3233 "name" : " My Example Custom View" ,
3334 "element" : " /App_Plugins/block-custom-view/dist/example-block-custom-view.js" ,
3435 "forContentTypeAlias" : " myElementTypeAlias" , // insert element type alias here
35- "forBlockEditor" : " block-list" // insert block type here
36+ "forBlockEditor" : " block-list" // insert block type here
3637 }
3738 ]
3839}
@@ -54,10 +55,14 @@ export class ExampleBlockCustomView extends UmbElementMixin(LitElement) implemen
5455 @property ({ attribute: false })
5556 content? : UmbBlockDataType ;
5657
58+ @property ({ attribute: false })
59+ settings? : UmbBlockDataType ;
60+
5761 render() {
5862 return html `
5963 <h5>My Custom View</h5>
6064 <p>Headline: ${this .content ?.headline }</p>
65+ <p>Theme: ${this .settings ?.theme }</p>
6166 ` ;
6267 }
6368
0 commit comments