# Custom Block View: How best to resolve content from a MNTP Unique?

**URL:** <https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403>\
**Category:** Questions\
**Tags:** v15, extending, bellissima\
**Created:** [May 8, 2025, 4:07pm UTC](https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403 "2025-05-08T16:07:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![warren](https://forum.umbraco.com/user_avatar/forum.umbraco.com/warren/32/78_2.png) [@warren](https://forum.umbraco.com/u/warren)\
**Post date:** [May 8, 2025, 4:07pm UTC](https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403/1 "2025-05-08T16:07:10Z")

</div>

Heya,  
I am trying to think of the best approach of building a custom block view for Bellissima that has some properties set on the top level of the block.

* * *

## Shape of JSON - Content property on Block

```json
{
    "header": "About",
    "introduction": {
        "markup": "<p>Lorem Lipsum</p>",
        "blocks": {
            "layout": {},
            "contentData": [],
            "settingsData": [],
            "expose": []
        }
    },
    "cardItems": {
        "layout": {
            "Umbraco.BlockList": [
                {
                    "$type": "BlockListLayoutItem",
                    "contentUdi": "umb://element/b5f91f1591664b989b402da255daa171",
                    "settingsUdi": null,
                    "contentKey": "b5f91f15-9166-4b98-9b40-2da255daa171",
                    "settingsKey": null
                },
                {
                    "$type": "BlockListLayoutItem",
                    "contentUdi": "umb://element/62fb62851b234d34a4323cbcc1733feb",
                    "settingsUdi": null,
                    "contentKey": "62fb6285-1b23-4d34-a432-3cbcc1733feb",
                    "settingsKey": null
                },
                {
                    "$type": "BlockListLayoutItem",
                    "contentUdi": "umb://element/c58024105eb74cb2aa40ada0369d5db8",
                    "settingsUdi": null,
                    "contentKey": "c5802410-5eb7-4cb2-aa40-ada0369d5db8",
                    "settingsKey": null
                },
                {
                    "$type": "BlockListLayoutItem",
                    "contentUdi": "umb://element/e07d5888e4634c6dac0e89008a24a96d",
                    "settingsUdi": null,
                    "contentKey": "e07d5888-e463-4c6d-ac0e-89008a24a96d",
                    "settingsKey": null
                },
                {
                    "$type": "BlockListLayoutItem",
                    "contentUdi": "umb://element/0b7d00e0024847308c6643e10d4c118e",
                    "settingsUdi": null,
                    "contentKey": "0b7d00e0-0248-4730-8c66-43e10d4c118e",
                    "settingsKey": null
                },
                {
                    "$type": "BlockListLayoutItem",
                    "contentUdi": "umb://element/d2fc5d2bd6244acc92b674f1275c4c85",
                    "settingsUdi": null,
                    "contentKey": "d2fc5d2b-d624-4acc-92b6-74f1275c4c85",
                    "settingsKey": null
                },
                {
                    "$type": "BlockListLayoutItem",
                    "contentUdi": "umb://element/7bac1321f5254523b05260c3be4be86b",
                    "settingsUdi": null,
                    "contentKey": "7bac1321-f525-4523-b052-60c3be4be86b",
                    "settingsKey": null
                },
                {
                    "$type": "BlockListLayoutItem",
                    "contentUdi": "umb://element/e7e5ea674ad04ea6a25f66b09654d5ed",
                    "settingsUdi": null,
                    "contentKey": "e7e5ea67-4ad0-4ea6-a25f-66b09654d5ed",
                    "settingsKey": null
                }
            ]
        },
        "contentData": [
            {
                "contentTypeKey": "c5714a85-0b3b-4c4e-888a-e34b9b25bd98",
                "udi": null,
                "key": "b5f91f15-9166-4b98-9b40-2da255daa171",
                "values": [
                    {
                        "editorAlias": "Umbraco.DateTime",
                        "culture": null,
                        "segment": null,
                        "alias": "scheduleDisplay",
                        "value": ""
                    },
                    {
                        "editorAlias": "Umbraco.TrueFalse",
                        "culture": null,
                        "segment": null,
                        "alias": "hidden",
                        "value": false
                    },
                    {
                        "editorAlias": "Umbraco.MultiNodeTreePicker",
                        "culture": null,
                        "segment": null,
                        "alias": "cardItem",
                        "value": [
                            {
                                "type": "document",
                                "unique": "00118592-176b-44a2-8e9e-42d6dcc37be9"
                            }
                        ]
                    },
                    {
                        "editorAlias": "Umbraco.Community.Contentment.DataList",
                        "culture": null,
                        "segment": null,
                        "alias": "size",
                        "value": "Small"
                    }
                ]
            },
            {
                "contentTypeKey": "c5714a85-0b3b-4c4e-888a-e34b9b25bd98",
                "udi": null,
                "key": "62fb6285-1b23-4d34-a432-3cbcc1733feb",
                "values": [
                    {
                        "editorAlias": "Umbraco.DateTime",
                        "culture": null,
                        "segment": null,
                        "alias": "scheduleDisplay",
                        "value": ""
                    },
                    {
                        "editorAlias": "Umbraco.TrueFalse",
                        "culture": null,
                        "segment": null,
                        "alias": "hidden",
                        "value": false
                    },
                    {
                        "editorAlias": "Umbraco.MultiNodeTreePicker",
                        "culture": null,
                        "segment": null,
                        "alias": "cardItem",
                        "value": [
                            {
                                "type": "document",
                                "unique": "f77bcaac-a21c-4d8e-a29d-3651183338d4"
                            }
                        ]
                    },
                    {
                        "editorAlias": "Umbraco.Community.Contentment.DataList",
                        "culture": null,
                        "segment": null,
                        "alias": "size",
                        "value": "Small"
                    }
                ]
            },
            {
                "contentTypeKey": "c5714a85-0b3b-4c4e-888a-e34b9b25bd98",
                "udi": null,
                "key": "d2fc5d2b-d624-4acc-92b6-74f1275c4c85",
                "values": [
                    {
                        "editorAlias": "Umbraco.DateTime",
                        "culture": null,
                        "segment": null,
                        "alias": "scheduleDisplay",
                        "value": ""
                    },
                    {
                        "editorAlias": "Umbraco.TrueFalse",
                        "culture": null,
                        "segment": null,
                        "alias": "hidden",
                        "value": false
                    },
                    {
                        "editorAlias": "Umbraco.MultiNodeTreePicker",
                        "culture": null,
                        "segment": null,
                        "alias": "cardItem",
                        "value": [
                            {
                                "type": "document",
                                "unique": "10ca3056-06f2-4788-8cf3-50d7d4296cc5"
                            }
                        ]
                    },
                    {
                        "editorAlias": "Umbraco.Community.Contentment.DataList",
                        "culture": null,
                        "segment": null,
                        "alias": "size",
                        "value": "Small"
                    }
                ]
            },
            {
                "contentTypeKey": "c5714a85-0b3b-4c4e-888a-e34b9b25bd98",
                "udi": null,
                "key": "e07d5888-e463-4c6d-ac0e-89008a24a96d",
                "values": [
                    {
                        "editorAlias": "Umbraco.DateTime",
                        "culture": null,
                        "segment": null,
                        "alias": "scheduleDisplay",
                        "value": ""
                    },
                    {
                        "editorAlias": "Umbraco.TrueFalse",
                        "culture": null,
                        "segment": null,
                        "alias": "hidden",
                        "value": false
                    },
                    {
                        "editorAlias": "Umbraco.MultiNodeTreePicker",
                        "culture": null,
                        "segment": null,
                        "alias": "cardItem",
                        "value": [
                            {
                                "type": "document",
                                "unique": "d2652cd2-2b2d-40ff-9438-8eac10a96ba0"
                            }
                        ]
                    },
                    {
                        "editorAlias": "Umbraco.Community.Contentment.DataList",
                        "culture": null,
                        "segment": null,
                        "alias": "size",
                        "value": "Medium"
                    }
                ]
            },
            {
                "contentTypeKey": "c5714a85-0b3b-4c4e-888a-e34b9b25bd98",
                "udi": null,
                "key": "c5802410-5eb7-4cb2-aa40-ada0369d5db8",
                "values": [
                    {
                        "editorAlias": "Umbraco.DateTime",
                        "culture": null,
                        "segment": null,
                        "alias": "scheduleDisplay",
                        "value": ""
                    },
                    {
                        "editorAlias": "Umbraco.TrueFalse",
                        "culture": null,
                        "segment": null,
                        "alias": "hidden",
                        "value": false
                    },
                    {
                        "editorAlias": "Umbraco.MultiNodeTreePicker",
                        "culture": null,
                        "segment": null,
                        "alias": "cardItem",
                        "value": [
                            {
                                "type": "document",
                                "unique": "bb56ca7c-7b91-47a9-99a3-f1d642452275"
                            }
                        ]
                    },
                    {
                        "editorAlias": "Umbraco.Community.Contentment.DataList",
                        "culture": null,
                        "segment": null,
                        "alias": "size",
                        "value": "Small"
                    }
                ]
            },
            {
                "contentTypeKey": "c5714a85-0b3b-4c4e-888a-e34b9b25bd98",
                "udi": null,
                "key": "e7e5ea67-4ad0-4ea6-a25f-66b09654d5ed",
                "values": [
                    {
                        "editorAlias": "Umbraco.DateTime",
                        "culture": null,
                        "segment": null,
                        "alias": "scheduleDisplay",
                        "value": ""
                    },
                    {
                        "editorAlias": "Umbraco.TrueFalse",
                        "culture": null,
                        "segment": null,
                        "alias": "hidden",
                        "value": false
                    },
                    {
                        "editorAlias": "Umbraco.MultiNodeTreePicker",
                        "culture": null,
                        "segment": null,
                        "alias": "cardItem",
                        "value": [
                            {
                                "type": "document",
                                "unique": "6522a6c9-4427-40eb-a05b-43dd7a2498a7"
                            }
                        ]
                    },
                    {
                        "editorAlias": "Umbraco.Community.Contentment.DataList",
                        "culture": null,
                        "segment": null,
                        "alias": "size",
                        "value": "Small"
                    }
                ]
            },
            {
                "contentTypeKey": "c5714a85-0b3b-4c4e-888a-e34b9b25bd98",
                "udi": null,
                "key": "7bac1321-f525-4523-b052-60c3be4be86b",
                "values": [
                    {
                        "editorAlias": "Umbraco.DateTime",
                        "culture": null,
                        "segment": null,
                        "alias": "scheduleDisplay",
                        "value": ""
                    },
                    {
                        "editorAlias": "Umbraco.TrueFalse",
                        "culture": null,
                        "segment": null,
                        "alias": "hidden",
                        "value": false
                    },
                    {
                        "editorAlias": "Umbraco.MultiNodeTreePicker",
                        "culture": null,
                        "segment": null,
                        "alias": "cardItem",
                        "value": [
                            {
                                "type": "document",
                                "unique": "1210af9b-73fc-4090-b9e5-010e16d00495"
                            }
                        ]
                    },
                    {
                        "editorAlias": "Umbraco.Community.Contentment.DataList",
                        "culture": null,
                        "segment": null,
                        "alias": "size",
                        "value": "Small"
                    }
                ]
            },
            {
                "contentTypeKey": "c5714a85-0b3b-4c4e-888a-e34b9b25bd98",
                "udi": null,
                "key": "0b7d00e0-0248-4730-8c66-43e10d4c118e",
                "values": [
                    {
                        "editorAlias": "Umbraco.DateTime",
                        "culture": null,
                        "segment": null,
                        "alias": "scheduleDisplay",
                        "value": ""
                    },
                    {
                        "editorAlias": "Umbraco.TrueFalse",
                        "culture": null,
                        "segment": null,
                        "alias": "hidden",
                        "value": false
                    },
                    {
                        "editorAlias": "Umbraco.MultiNodeTreePicker",
                        "culture": null,
                        "segment": null,
                        "alias": "cardItem",
                        "value": [
                            {
                                "type": "document",
                                "unique": "9ccf31ec-9d20-4e86-9c15-25f97c299428"
                            }
                        ]
                    },
                    {
                        "editorAlias": "Umbraco.Community.Contentment.DataList",
                        "culture": null,
                        "segment": null,
                        "alias": "size",
                        "value": "Small"
                    }
                ]
            }
        ],
        "settingsData": [],
        "expose": [
            {
                "contentKey": "b5f91f15-9166-4b98-9b40-2da255daa171",
                "culture": null,
                "segment": null
            },
            {
                "contentKey": "62fb6285-1b23-4d34-a432-3cbcc1733feb",
                "culture": null,
                "segment": null
            },
            {
                "contentKey": "d2fc5d2b-d624-4acc-92b6-74f1275c4c85",
                "culture": null,
                "segment": null
            },
            {
                "contentKey": "e07d5888-e463-4c6d-ac0e-89008a24a96d",
                "culture": null,
                "segment": null
            },
            {
                "contentKey": "c5802410-5eb7-4cb2-aa40-ada0369d5db8",
                "culture": null,
                "segment": null
            },
            {
                "contentKey": "e7e5ea67-4ad0-4ea6-a25f-66b09654d5ed",
                "culture": null,
                "segment": null
            },
            {
                "contentKey": "7bac1321-f525-4523-b052-60c3be4be86b",
                "culture": null,
                "segment": null
            },
            {
                "contentKey": "0b7d00e0-0248-4730-8c66-43e10d4c118e",
                "culture": null,
                "segment": null
            }
        ]
    }
}

```

I can easily grab the following information to use in the HTML of the component

- header ✅
- introduction ✅

For the `cardItems` property at this level, it is an **Umbraco Block List** which the JSON object contains:

- layout
- contentData
- settingsData
- expose

Again I am able to get info and values out of the items in the `cardItems` from inside `cardItems.contentData` such as

- scheduleDisplay ✅
- hidden ✅
- size ✅

But the property `cardItem` is a MNTP picker set to allow only pick one content node and contains two properties `type` and `unique`

I am stuck at this point, on how best to get properties/values of the picked node in the MNTP as I only have a GUID/key of the picked document.

## Ideas…

My thought to this problem is to get the list of **contentKey** stored in **expose** array at the top level and call a custom C# API controller to get the content server side and resolve the picked content node stored in the content picker and return my own shape of data.

## Has anyone else resolved this?

Does anyone else have any other suggestions or ideas on how to resolve this level of nesting of content and properties inside an element type?

## TL:DR version

- Unsure how to resolve a MNTP picked node to get more data/properties for rendering

---

<div class="post-metadata">

**Author:** ![sm-rob](https://forum.umbraco.com/user_avatar/forum.umbraco.com/sm-rob/32/775_2.png) [@sm-rob](https://forum.umbraco.com/u/sm-rob)\
**Post date:** [May 9, 2025, 9:20am UTC](https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403/2 "2025-05-09T09:20:11Z")

</div>

Hello @warren,

As per most of my responses, please don’t take this as gospel, I’ve been trying all sorts of stuff, and the last thing I want to do is lead people up the wrong garden path.

However. If you see this reply on this post:

> [@Opening a Content Picker modal from a Custom Property Editor](https://forum.umbraco.com/t/opening-a-content-picker-modal-from-a-custom-property-editor/3039/3):
>
> Hello @KevinJump . Thank you so much. Not sure how I missed that. With regards to getting the details. I am having to use “UmbDocumentItemRepository”. to get the details of the item(s) that were selected. I assume this is an ok approach? E.g import { UMB\_DOCUMENT\_PICKER\_MODAL, UmbDocumentItemRepository } from '@umbraco-cms/backoffice/document'; #itemRepository = new UmbDocumentItemRepository(this); modal.onSubmit().then(async (response) =\> { if (!response) return; let { data } = awa…

Using the DocumentItemRepository might help you get the content via the unique property for your card item.

```auto
import { UmbDocumentItemRepository } from '@umbraco-cms/backoffice/document';

```

and

```auto
let { data } = await this.#itemRepository.requestItems( [unique] );

```

I might be wrong, but .requestItems is looking for an array of unique’s.

Thank you,  
Rob

---

<div class="post-metadata">

**Author:** ![leekelleher](https://forum.umbraco.com/user_avatar/forum.umbraco.com/leekelleher/32/121_2.png) [@leekelleher](https://forum.umbraco.com/u/leekelleher)\
**Post date:** [May 9, 2025, 9:50am UTC](https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403/3 "2025-05-09T09:50:50Z")

</div>

@warren As @sm-rob suggests, try the `UmbDocumentItemRepository`. That’ll give you [basic meta-data of a document](https://github.com/umbraco/Umbraco-CMS/blob/release-15.4.1/src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/repository/types.ts#L6-L20), but if you need the full model (e.g. to get other property data), try `UmbDocumentDetailRepository` instead.

One note about your initial idea, the `expose` property/object holds references to the block item keys, (e.g. element types), not the content picker’s document/node. You’d need to drill down to a block’s `cardItem` property and get the `unique` from the value array.

---

<div class="post-metadata">

**Author:** ![warren](https://forum.umbraco.com/user_avatar/forum.umbraco.com/warren/32/78_2.png) [@warren](https://forum.umbraco.com/u/warren)\
**Post date:** [May 9, 2025, 10:40am UTC](https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403/4 "2025-05-09T10:40:25Z")

</div>

Yes the expose I was going to send them off to the server and then use that to get the outer element type with its properties and then get the data I need with content cache for the MNTP.

But when back at my desk I will try using the UmbDocumebtDetailRepository. Do you think it would be best to split each child item into a new web component that has a property for the unique and deal with it that way?

---

<div class="post-metadata">

**Author:** ![leekelleher](https://forum.umbraco.com/user_avatar/forum.umbraco.com/leekelleher/32/121_2.png) [@leekelleher](https://forum.umbraco.com/u/leekelleher)\
**Post date:** [May 9, 2025, 11:12am UTC](https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403/5 "2025-05-09T11:12:21Z")

</div>

> [@warren](#):
>
> Do you think it would be best to split each child item into a new web component that has a property for the unique and deal with it that way?

It’s entirely your call. 😀

Breaking the logic down into more granular web-components is good for maintenance/reusability… but comes with the extra development effort upfront. So if you’re going to reuse these in other custom block views or other projects, then it makes sense. 👍

---

<div class="post-metadata">

**Author:** ![warren](https://forum.umbraco.com/user_avatar/forum.umbraco.com/warren/32/78_2.png) [@warren](https://forum.umbraco.com/u/warren)\
**Post date:** [May 9, 2025, 11:28am UTC](https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403/6 "2025-05-09T11:28:43Z")

</div>

Yeh trying to see if I can be semi clever somehow and make the component semi-generic and that the default slot could be used somehow as the way to template it.

As the scenario of an element type having a property that then has a MNTP on the element, is a common pattern for this project/client.

So just trying to think what is the best most effective way.

---

<div class="post-metadata">

**Author:** ![warren](https://forum.umbraco.com/user_avatar/forum.umbraco.com/warren/32/78_2.png) [@warren](https://forum.umbraco.com/u/warren)\
**Post date:** [May 15, 2025, 4:50pm UTC](https://forum.umbraco.com/t/custom-block-view-how-best-to-resolve-content-from-a-mntp-unique/3403/7 "2025-05-15T16:50:15Z")

</div>

OK I have been back to this problem today and new’ing up `UmbDocumentDetailRepository` has been useful to get the values of the picked node in the MNTP, so thanks @leekelleher and @sm-rob :umbraco-heart:

## Data Structure

Just a reminder of this client’s data structure:

> Card Block Element → Card Items (Block List) → Card Item (MNTP) → Title (textString)

## Screenshot

 ![This screenshot shows the user interface of a content management system, displaying content cards in both English and Czech languages with details such as title, culture, and scheduling status, and a console at the bottom logging potential errors or deferred events. (Captioned by AI)](https://forum.umbraco.com/uploads/default/original/2X/d/d3c213fc8148d0cf8eae8a6881ae842693d05c1d.png)

## Code Review

I would love a code review of the approach, before I do any tidying up.  
_Currently this feels very complex to do this ☹_

- Am I getting the culture from the right place - so so so many contexts !!
  - Should I be getting it from `UMB_CONTENT_PROPERTY_DATASET_CONTEXT` or somewhere else?

- When I was exploring contexts I noticed there was nice ways to get property values, is there a way I can use this when nested further inside the block list or down with the picked node in the MNTP?

## Code

I have the two following classes:

- `cards.ts` - is what is used to display the top level properties on the card element
- `card-item-element.ts` - is used for each item in the blocklist property

### cards.ts

```ts
import { UmbBlockDataType } from "@umbraco-cms/backoffice/block";
import { UmbBlockEditorCustomViewElement } from "@umbraco-cms/backoffice/block-custom-view";
import { UmbElementMixin } from "@umbraco-cms/backoffice/element-api";
import { css, customElement, html, LitElement, nothing, property, unsafeHTML } from "@umbraco-cms/backoffice/external/lit";
import { CommonStyles } from "./common-styles";
import './card-item-element';

interface CardsBlockContent extends UmbBlockDataType {
    header?: string;
    introduction?: {
        markup?: string;
    }
    cardItems?: {
        contentData?: [],
        layout?: {
            "Umbraco.BlockList": [
                {
                    contentKey: string;
                }
            ];
        };
    }
}

@customElement('cards-block-view')
export class CardsBlockViewElement extends UmbElementMixin(LitElement) implements UmbBlockEditorCustomViewElement {

    constructor() {
        super();
    }

    @property({attribute: false})
    label?: string;

    @property({attribute: false})
    content?: CardsBlockContent;

    @property({attribute: false})
    settings?: UmbBlockDataType;

    
    render() {
        const layout = this.content?.cardItems?.layout?.['Umbraco.BlockList'] || [];
        const cardItemsData = this.content?.cardItems?.contentData || [];

        return html`
            <fieldset>
                <legend>${this.label ?? 'Cards'}</legend>

                <div class="paddings lightgray">
                    ${this.content?.header ? 
                        html`<h2>${this.content.header}</h2>` 
                        : nothing
                    }

                    ${unsafeHTML(this.content?.introduction?.markup)}

                    <div class="cards-container">
                        ${layout.map((layoutItem) => {
                            const item = cardItemsData.find((cd:any) => cd.key === layoutItem.contentKey);
                            return item
                                ? html`<cards-card-item .item=${item}></cards-card-item>`
                                : nothing;
                        })}
                    </div>
                </div>
            </fieldset>
        `;
    }

    static styles = [
        CommonStyles,
        css `            
            h2 {
                margin: auto;
                margin-bottom: 20px;
            }

            .cards-container {
                display: flex;
                justify-content: space-between;
                flex-wrap: wrap;
                width: 100%;
            }

            cards-card-item {
                display: flex;
                flex-wrap: wrap;
                flex-direction: column;
                width: 25%;
                padding: 10px;

                background:grey;
                margin:10px 0;
            }
        `
    ]
}

export default CardsBlockViewElement;

declare global {
    interface HTMLElementTagNameMap {
        'cards-block-view': CardsBlockViewElement;
    }
}

```

### card-item-element.ts

```ts
import { LitElement, css, html, customElement, property, nothing, state } from "@umbraco-cms/backoffice/external/lit";
import { UmbElementMixin } from "@umbraco-cms/backoffice/element-api";
import { UmbDocumentDetailRepository } from "@umbraco-cms/backoffice/document";
import { UMB_CONTENT_PROPERTY_DATASET_CONTEXT } from "@umbraco-cms/backoffice/content";

@customElement('cards-card-item')
export class CardsCardBlockViewElement extends UmbElementMixin(LitElement) {

  #documentDetailRepo: UmbDocumentDetailRepository;

  constructor() {
    super();

    this.consumeContext(UMB_CONTENT_PROPERTY_DATASET_CONTEXT, (umbContentPropertyDatasetCtx) => {

      this.observe(umbContentPropertyDatasetCtx.culture, (culture) => {
        this.culture = culture ?? undefined;
      });
    });

    // New up UmbDocumentDetailRepository - so we can use it to fetch info about the picked items in the MNTP
    this.#documentDetailRepo = new UmbDocumentDetailRepository(this);
  }

  // Lit lifecycle event
  updated(changedProperties: Map<string, any>) {
    if (changedProperties.has('item')) {
      this.#getValues();
    }
  }

  @property({ attribute: false })
  item?: any;

  @state()
  itemKey?: string;

  @state()
  culture?: string;

  @state()
  scheduleDisplay?: string;

  @state()
  size?: string;

  @state()
  hidden: boolean = false;

  @state()
  mntpTitle?: string;

  async #getValues(){
    const values = this.item?.values ?? [];
    this.itemKey = this.item?.key;

    // Values at the top level of the block element
    this.scheduleDisplay = values.find((v: any) => v.alias === 'scheduleDisplay')?.value || nothing; // TODO: Render as proper date
    this.size = values.find((v: any) => v.alias === 'size')?.value || nothing;
    this.hidden = values.find((v: any) => v.alias === 'hidden')?.value ?? false;
    

    // This is a MNTP picker, so we need to get the first item in the array and then get the unique value from that item
    const cardItemMntp = values.find((v: any) => v.alias === 'cardItem')?.value;
    const cardItemMntpUnique = Array.isArray(cardItemMntp) && cardItemMntp.length > 0 ? cardItemMntp[0].unique : nothing;
    //console.log('cardItemMntpUnique', cardItemMntpUnique);

    // Go and get the picked item from the MNTP
    let { data: documentData } = await this.#documentDetailRepo.requestByUnique(cardItemMntpUnique);
    console.log('document details', documentData);

    // Assign states to use in the template
    this.mntpTitle = documentData?.values.find((item: any) => item.alias === 'title' && item.culture === this.culture)?.value as string ?? nothing;
  }

  render() {
    return html`
       <div class="card-item">
            <uui-tag look="primary" color="default">Culture: ${this.culture}</uui-tag>
            <p>${this.itemKey}</p>
            <div>
                <img ng-src="{{item.card.cardDetails.ImageUrl}}" />
            </div>
            <h3>Title: ${this.mntpTitle}</h3>

            ${this.hidden
              ? html`<uui-tag look="primary" color="default">Hidden</uui-tag>`
              : nothing
            }

            <uui-tag look="primary" color="default">Size: ${this.size}</uui-tag>
            <uui-tag look="primary" color="default">Scheduled for Display: ${this.scheduleDisplay}</uui-tag>
        </div>
    `;
  }

  static styles = [
    css`
        :host {
          border: 2px solid red;
        }

        .card-item {
          border: 2px solid green;
        }

         h3 {
          margin: 0;
         }
    `];
}

export default CardsCardBlockViewElement;

declare global {
  interface HTMLElementTagNameMap {
    'cards-card-item': CardsCardBlockViewElement;
  }
}

```

# Help

- What would you change or improve - ignoring the awful CSS debug/styling 🙈
