NIHVIVO-2449 In search results, display preferredTitle with fallback to mostSpecificTypes
This commit is contained in:
parent
cb5f5ed18c
commit
9ee6a96c55
4 changed files with 53 additions and 1 deletions
14
productMods/templates/freemarker/lib/lib-vivo-properties.ftl
Normal file
14
productMods/templates/freemarker/lib/lib-vivo-properties.ftl
Normal file
|
@ -0,0 +1,14 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Macros related to the display of vivo ontology properties -->
|
||||
|
||||
<#import "lib-properties.ftl" as p>
|
||||
|
||||
<#-- Display preferredTitle if it exists; otherwise display mostSpecificTypes -->
|
||||
<#macro displayTitle individual>
|
||||
<#if individual.preferredTitle?has_content>
|
||||
<span class="display-title">${individual.preferredTitle}</span>
|
||||
<#else>
|
||||
<@p.mostSpecificTypes individual />
|
||||
</#if>
|
||||
</#macro>
|
Loading…
Add table
Add a link
Reference in a new issue