Metadata with relationship type

Hi there,

Our public object record has a metadata element for inscription. I'm trying to add the inscription type and have had success with this code:

{{{<ifdef code="ca_objects.inscriptionSet.inscriptionText"><H6>Inscription</H6></ifdef>}}}{{{<unit relativeTo="ca_objects" delimiter="<br/>">^ca_objects.inscriptionSet.inscriptionText (^ca_objects.inscriptionSet.inscriptionType)</unit>}}}

The inscriptions are formatted correctly but I'm finding that now when I edit any part of a record, it saves an empty inscription element, resulting in empty parentheses () on the frontend. Can you let me know what I'm missing or incorrectly referencing above?

Thank you!

Comments

  • You can avoid creating those blank records by setting the value for "Minimum number of attribute bundles to show in an editing form." to 0 for the element in its type restriction configuration. You could also surround the entire output with an <ifdef> to prevent display of blanks:

    {{{<ifdef code="ca_objects.inscriptionSet.inscriptionText"><H6>Inscription</H6><unit relativeTo="ca_objects" delimiter="<br/>">^ca_objects.inscriptionSet.inscriptionText (^ca_objects.inscriptionSet.inscriptionType)</unit></ifdef>}}}

Sign In or Register to comment.