Hi everyone! 
I’d like to keep the property onthology terms visible (yet grayed out) in the Item display, but instead of the technical “ID” of the term (eg dcterms:title, rdau:P60075), show the upstream label.
Example property “has date of usage” from RDA Registry)
- Current (default): “Identifying Year (
rdau:P60075)”
- Wish: “Identifying Year (
rdau:has date of usage)”
Is that possible, and where would I find the theme template that renders this?
Many thanks in advance!
We don’t have an out of the box feature for doing this. That “term” display is controlled by a setting, but it only supports showing the internal ID or just the vocabulary label.
It is something you can override in a theme: the relevant template file is view/common/resource-values.phtml
There’s a section in there that sets what will be printed as the “term” info according to the configured setting:
if ('term' === $labelInfo) {
$propertyTerm = $property->term();
} elseif ('vocab' === $labelInfo) {
$propertyTerm = $property->vocabulary()->label();
} else {
$propertyTerm = null;
}
Setting $propertyTerm to something else there will change what gets printed, so you could set code to get the vocabulary prefix and the property label and use that to do what you mentioned.
1 Like
Great!
Since the original “label” used by the onthologies is available as onmouseover-hint in other areas (eg faceted-browse value config), I can check there, which property contains the human readable label.
Thanksalot! 