1<#if umcg_library_path??><#import umcg_library_path as umcg_library /></#if>
2<#assign complete_url = request.getAttribute("CURRENT_COMPLETE_URL")!'' />
3
4<#if entries?has_content>
5 <#if entries?size gt 1>
6 <ul>
7 </#if>
8 <#list entries as curEntry>
9 <#assign
10 image = {}
11 raw_image = ''
12 image_alt = ''
13 image_url = ''
14 renderer = curEntry.getAssetRenderer()
15 className = renderer.getClassName()
16 title = curEntry.getTitle(locale)
17 url = curEntry.getAssetRenderer().getURLViewInContext(renderRequest, renderResponse, currentURL)
18 fileEntryId = ''
19 />
20
21 <#assign article = renderer.getArticle() />
22 <#assign document = saxReaderUtil.read(article.getContentByLocale(locale.toString()) ) />
23 <#assign rootElement = document.getRootElement() />
24
25 <#assign xPathSelector = saxReaderUtil.createXPath("//dynamic-element[@name='Teaser']") />
26 <#assign teaser_node = (xPathSelector.selectSingleNode(rootElement))! />
27
28 <#assign xPathSelector = saxReaderUtil.createXPath("//dynamic-element[@name='TeaserTitle']") />
29 <#assign teaser_title = (xPathSelector.selectSingleNode(teaser_node).getStringValue())!'' />
30
31 <#assign xPathSelector = saxReaderUtil.createXPath("//dynamic-element[@name='TeaserText']") />
32 <#assign teaser_text = (xPathSelector.selectSingleNode(teaser_node).getStringValue())!'' />
33
34 <#assign xPathSelector = saxReaderUtil.createXPath("//dynamic-element[@name='TeaserImage']") />
35 <#assign raw_image = ((xPathSelector.selectSingleNode(teaser_node).getStringValue())?trim)!'' />
36
37 <#if raw_image?has_content>
38 <#assign raw_image = raw_image?eval/>
39 <#assign fileEntryId = (raw_image.fileEntryId) />
40 <#if fileEntryId?has_content>
41 <#assign image_url = umcgContentService.getImageUrl((fileEntryId!0)?number)/>
42 </#if>
43 <#assign image_alt = (raw_image.alt)!'' />
44 </#if>
45
46 <#if className?contains("com.liferay.journal.model.JournalArticle") >
47 <#assign image = {
48 'image': image_url!'',
49 'alt': image_alt!''
50 } />
51
52 <#if fileEntryId?has_content>
53 <#assign image = image + {
54 'file_id': fileEntryId
55 } />
56 </#if>
57
58 <#if entries?size gt 1>
59 <li>
60 </#if>
61
62 <@umcg_library.facilities_list_item
63 url=url
64 title=teaser_title
65 text=teaser_text
66 image=image
67 />
68
69 <#if entries?size gt 1>
70 </li>
71 </#if>
72
73 </#if>
74 </#list>
75
76 <#if entries?size gt 1>
77 </ul>
78 </#if>
79<#elseif (complete_url?has_content && httpComponentsUtil.getParameter(complete_url, "p_l_mode", false)?contains("edit"))>
80 - Use the switch in the fragment settings to select related assets or set assets manually.<br/>
81 - Select Configuration<br/>
82 - Go to Asset selection and configure selection<br/>
83 - Select Display Template>"Card list vertical"<br/>
84</#if>