1<#--
2Add elements from the sidebar to define your template. Type "${" to use the
3autocomplete feature.
4-->
5
6<div class="mb-3 pb-3">
7<div class="card white-bg-card is-horizontal-on-desktop is-horizontal-on-mobile is-stacked-on-mobile" data-sameheight="" style="min-height: 0px;">
8 <div class="card-img height-150-width-auto-16x9" data-sameheight="" style="min-height: 0px;">
9 <#if (image.getData())?? && image.getData() != "">
10 <img alt="${image.getAttribute("alt")}" data-fileentryid="${image.getAttribute("fileEntryId")}" src="${image.getData()}" onerror="this.onerror=null;this.src="/documents/d/guest/img-listdefault";"/ aria-hidden="true">
11 <#else>
12 <img src="/documents/d/guest/img-listdefault" alt="default-image" aria-hidden="true">
13 </#if>
14 </div>
15
16 <div class="card-body">
17
18 <h3 class="card-title" data-truncate="2" data-sameheight="" style="min-height: 0px;">
19 <a href="${friendlyURL?replace('/web/asset-library-45247','')}">
20 ${title.getData()}
21 </a>
22 </h3>
23
24 <div class="card-para" data-truncate="3" data-sameheight="" style="min-height: 0px;">
25 <#if (summary.getData())??>
26 ${summary.getData()}
27 </#if>
28 </div>
29
30 <#--
31Add elements from the sidebar to define your template. Type "${" to use the
32autocomplete feature.
33-->
34 <#assign externalRefCode = .vars["reserved-article-external-reference-code"].data>
35 <#assign url = "/headless-delivery/v1.0/sites/${groupId}/structured-contents/by-external-reference-code/${externalRefCode}?fields=taxonomyCategoryBriefs.taxonomyCategoryName,taxonomyCategoryBriefs.taxonomyCategoryId">
36 <#assign taxonomyCategoryBriefs = restClient.get(url)>
37 <#assign contentType = "" />
38 <#assign articleType = "" />
39 <#assign topics = "" />
40
41 <#if taxonomyCategoryBriefs??>
42 <#list taxonomyCategoryBriefs as key, categories>
43 <#list categories as category>
44 <#if category.taxonomyCategoryName??>
45 <#assign parentTaxonomyVocabularyRes = restClient.get("/headless-admin-taxonomy/v1.0/taxonomy-categories/${category.taxonomyCategoryId}") />
46 <!-- ${parentTaxonomyVocabularyRes.parentTaxonomyVocabulary.name} -->
47 <#if parentTaxonomyVocabularyRes?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary.name = 'Content Type'>
48 <#assign contentType = category.taxonomyCategoryName />
49 </#if>
50 <#if parentTaxonomyVocabularyRes?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary.name = 'Article Type'>
51 <#assign articleType = category.taxonomyCategoryName />
52 </#if>
53 <#if parentTaxonomyVocabularyRes?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary.name = 'Topic'>
54 <#assign pillText = category.taxonomyCategoryName />
55 <#if pillText?matches(".*\\(.*\\).*")>
56 <#-- Extract only the text inside the last set of parentheses -->
57 <#assign pillText = pillText?replace(".*\\((.*?)\\).*", "$1", "r") />
58 </#if>
59 <#assign topics += '<span class="body-13 tag-pill">' + pillText + '</span> ' />
60 </#if>
61 </#if>
62 </#list>
63 </#list>
64
65
66 <#assign publicationDate_Data = getterUtil.getString(publicationDate.getData())>
67 <#if validator.isNotNull(publicationDate_Data)>
68 <#assign publicationDate_DateObj = dateUtil.parseDate("yyyy-MM-dd", publicationDate_Data, locale)>
69 ${dateUtil.getDate(publicationDate_DateObj, "MMMM dd, yyyy", locale)} |
70 </#if>
71 </#if>
72
73 <strong>${articleType}</strong>
74
75 <#if topics != "">
76 <span class="mt-2 d-inline-block">${topics}</span>
77 </#if>
78
79 </div>
80</div>
81</div>