Block appearance Label ContentType

Hi! I want to change the Block appearance Label with the value of the object that is assign. But i dont get it working. I found some documenation which explains that i need to use {umbValue: contactPerson} to receive the umbraco values. But i cannot find the correct syntax to go deeper into the object.

The object i want to work with looks like the following:

<?xml version="1.0" encoding="utf-8"?>
<ContentType Key="c3cdb387-a799-42e0-ae5d-556928933efc" Alias="contactPerson" Level="3">
  <Info>
    <Name>Contact Person</Name>
    <Icon>icon-user color-blue</Icon>
    <Thumbnail>folder.png</Thumbnail>
    <Description></Description>
    <AllowAtRoot>False</AllowAtRoot>
    <ListView>00000000-0000-0000-0000-000000000000</ListView>
    <Variations>Nothing</Variations>
    <IsElement>false</IsElement>
    <HistoryCleanup>
      <PreventCleanup>False</PreventCleanup>
      <KeepAllVersionsNewerThanDays></KeepAllVersionsNewerThanDays>
      <KeepLatestVersionPerDayForDays></KeepLatestVersionPerDayForDays>
    </HistoryCleanup>
    <Folder>Data/Contact+Persons</Folder>
    <Compositions />
    <DefaultTemplate></DefaultTemplate>
    <AllowedTemplates />
  </Info>
  <Structure />
  <GenericProperties>
    <GenericProperty>
      <Key>69ee0645-3bfd-457d-a7de-3a565bcaed4b</Key>
      <Name>Email</Name>
      <Alias>email</Alias>
      <Definition>b97b8229-fc09-4d76-a194-1f83fb4c0825</Definition>
      <Type>Umbraco.TextBox</Type>
      <Mandatory>false</Mandatory>
      <Validation></Validation>
      <Description><![CDATA[]]></Description>
      <SortOrder>2</SortOrder>
      <Tab Alias="contactPerson">Contact Person</Tab>
      <Variations>Nothing</Variations>
      <MandatoryMessage></MandatoryMessage>
      <ValidationRegExpMessage></ValidationRegExpMessage>
      <LabelOnTop>false</LabelOnTop>
    </GenericProperty>
...

How can i extract for example the email field? {umbValue: contactPerson.email} didnt work.

Thanks in advance!

Hi @StijnAvdL

To my knowledge and looking at the docs I don’t believe the retrieval of individual properties from something like a content picker field is currently supported. I also found this answer from March that suggests the same https://forum.umbraco.com/t/how-do-i-refer-to-a-nested-content-picker-value-in-a-label-template-with-ufm

The best you can do for now without some sort custom code would be to just use the content name instead.

For example {umbContentName: personPicker}

1 Like

Hi @jawood1

That is just what i wanted! Thanks! I was searching the forum but seems not good enough. Thanks for helping.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.