1<#--
2Add elements from the sidebar to define your template. Type "${" to use the
3autocomplete feature.
4-->
5
6<#assign contentStructureIdForPerson = 45349 />
7 <#assign externalRefCode = .vars["reserved-article-external-reference-code"].data>
8 <#assign url = "/headless-delivery/v1.0/sites/${groupId}/structured-contents/by-external-reference-code/${externalRefCode}?fields=relatedContents,taxonomyCategoryBriefs.taxonomyCategoryName,taxonomyCategoryBriefs.taxonomyCategoryId,relatedContents">
9 <#assign taxonomyCategoryBriefs = restClient.get(url)>
10 <#assign contentType = "" />
11 <#assign articleType = "" />
12 <#assign topics = "" />
13 <#assign authorName = "" />
14 <#assign authorUrl = '' />
15 <#assign index = 0 />
16
17 <#if taxonomyCategoryBriefs??>
18 <#list taxonomyCategoryBriefs as key, categories>
19 <#list categories as category>
20 <#if category.taxonomyCategoryName??>
21 <#assign parentTaxonomyVocabularyRes = restClient.get("/headless-admin-taxonomy/v1.0/taxonomy-categories/${category.taxonomyCategoryId}") />
22 <#if parentTaxonomyVocabularyRes?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary.name = 'Content Type'>
23 <#assign contentType = category.taxonomyCategoryName />
24 </#if>
25 <#if parentTaxonomyVocabularyRes?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary.name = 'Article Type'>
26 <#assign articleType = category.taxonomyCategoryName />
27 </#if>
28 <#if parentTaxonomyVocabularyRes?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary?? && parentTaxonomyVocabularyRes.parentTaxonomyVocabulary.name = 'IB Categories'>
29 <#if index?number < 2>
30 <#assign topics = topics + '<span class="tag-pill body-13">' + category.taxonomyCategoryName + '</span>' />
31 </#if>
32 <#assign index++ />
33 </#if>
34 </#if>
35 </#list>
36 </#list>
37
38<#assign relatedItems = taxonomyCategoryBriefs.relatedContents />
39
40<#if relatedItems?has_content>
41 <#list relatedItems as item>
42 <#assign relatedItem = restClient.get("/headless-delivery/v1.0/structured-contents/${item.id}") />
43 <#if relatedItem.contentStructureId = contentStructureIdForPerson >
44 <#assign authorName = relatedItem.title />
45 <#assign authorUrl = '/w/${relatedItem.friendlyUrlPath}' />
46 </#if>
47 </#list>
48</#if>
49
50
51<div class="card">
52 <div class="card-img image-ratio-16x9">
53 <#if (banner.getData())?? && banner.getData() != "">
54 <img alt="${banner.getAttribute("alt")}" data-fileentryid="${banner.getAttribute("fileEntryId")}" src="${banner.getData()}" onerror="this.onerror=null;this.src='/documents/d/guest/img-listdefault';" />
55 <#else>
56 <img alt="" src="/documents/d/guest/img-listdefault" />
57 </#if>
58 </div>
59
60 <div class="card-body">
61 <h3 class="card-title header-xs m-0" data-truncate="3">
62 <a href="/w/${.vars["reserved-article-url-title"].data}"><#if (title.getData())??>${title.getData()}</#if></a></h3>
63 <div class="card-meta">
64
65<#if .vars["reserved-article-asset-tag-names"].data?contains('Sponsored Content')>
66<span class="tag-pill body-13">SPONSORED</span>
67<#else>
68<#if authorName != ''>
69 <#if articleType == 'Press Release'>
70 <p>By ICBA</p>
71 <#else>
72 <p>By <a href="${authorUrl}">${authorName}</a></p>
73 </#if>
74 <#else>
75 <p>By ICBA</p>
76 </#if>
77 </#if>
78</#if>
79 </div>
80
81 <div class="d-flex gap-2 flex-wrap mt-2">
82 ${topics}
83 </div>
84
85 </div>
86</div>