1<#if entries?has_content>
2 <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )>
3 <div class="container infoSlick">
4 <#list entries as curEntry>
5
6 <#assign entry_classPK = curEntry.classPK
7 currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", entry_classPK?number)
8 assetRenderer = curEntry.getAssetRenderer()
9 entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
10 urlPreview = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse,assetRenderer, curEntry,true)
11 relatedContentUrlPreview=""/>
12
13 <#if adtContributor.getRelatedContent(curEntry)??>
14 <#assign relatedContentEntry = adtContributor.getRelatedContent(curEntry)>
15 <#if relatedContentEntry?? && relatedContentEntry?has_content>
16 <#assign relatedContentUrlPreview = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, relatedContentEntry)>
17 </#if>
18 </#if>
19 <#assign customEntry = adtContributor.getRelevantContent(curEntry, urlPreview, relatedContentEntry, relatedContentUrlPreview, locale, themeDisplay)>
20
21
22 <#assign docXml = saxReaderUtil.read(curEntry.getAssetRenderer().getArticle().getContentByLocale(locale.toString())) />
23
24 <#assign rootElement = docXml.getRootElement() />
25
26
27
28 <#assign Titulo = docXml.valueOf("//dynamic-element[@name='Titulo1']/dynamic-content/text()") />
29 <#assign Descripcion = docXml.valueOf("//dynamic-element[@name='Entradilla']/dynamic-content/text()") />
30
31 <#assign Url = docXml.valueOf("//dynamic-element[@name='Url']/dynamic-content/text()") />
32
33
34 <#assign link = saxReaderUtil.createXPath("dynamic-element[@name='EnlaceInterno']").selectNodes(rootElement) />
35 <#list link as enlac>
36 ${enlac.toString()}
37 </#list>
38
39 <#assign page_link_data = docXml.valueOf("//dynamic-element[@name='EnlaceInterno']/dynamic-content/text()") />
40
41 <#if page_link_data?has_content>
42 <#-- split the string to just get the page layout id , groupID and if its a private layout-->
43 <#list page_link_data?split("@") as item>
44 <#if item_index == 0>
45 <#assign linkPageId = item?number>
46 </#if>
47 <#if item_index == 1>
48 <#if item == "private">
49 <#assign linkPrivate = true>
50 <#else>
51 <#assign linkPrivate = false>
52 </#if>
53 </#if>
54 <#if item_index = 2>
55 <#assign linkGroupId = item?number>
56 </#if>
57 </#list>
58
59 <#assign layoutLocalService = staticUtil["com.liferay.portal.kernel.service.LayoutLocalServiceUtil"]>
60 <#assign pageLayout = layoutLocalService.getLayout(linkGroupId, linkPrivate, linkPageId)>
61
62 <#-- get Friendly URL -->
63 <#assign portalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"]>
64 <#assign friendly_page_link = portalUtil.getLayoutFriendlyURL(pageLayout, themeDisplay)>
65 </#if>
66
67
68 <#assign linkExt = docXml.valueOf("//dynamic-element[@name='EnlaceExterno']/dynamic-content/text()") />
69
70 <#assign TextoEnlace = docXml.valueOf("//dynamic-element[@name='TextoEnlace']/dynamic-content/text()") />
71
72
73 <#if linkExt?has_content>
74 <#assign Url = linkExt />
75 </#if>
76
77 <#assign TextoEnlace = "Ir a noticia" />
78 <#assign Target = docXml.valueOf("//dynamic-element[@name='target']/dynamic-content/text()") />
79
80 <#assign img = "" />
81 <#assign Imagen = docXml.valueOf("//dynamic-element[@name='Imagen']/dynamic-content") />
82 <#if Imagen?has_content>
83 <#assign imageJson=Imagen?eval>
84 <#assign img = "<img src=\"/documents/${imageJson.groupId}/${imageJson.fileEntryId}/${imageJson.name}/${imageJson.uuid}\" alt=\"${imageJson.alt}\" />" />
85 </#if>
86 <div>
87 <div class="zoomimg">
88 ${img}
89 </div>
90 <h3>${Titulo}</h3>
91 <#if Descripcion?has_content>
92 <p>${Descripcion}</p>
93 </#if>
94
95 <#if Url?has_content && TextoEnlace?has_content>
96 <#assign target = "" />
97 <#if Target?has_content && Target != "_self">
98 <#assign target = "target=\"_blank\" rel=\"noopener noreferrer\"" />
99 </#if>
100 <p class="py-3">
101 <#if customEntry?has_content && customEntry.url?has_content && customEntry.url != "">
102 <a href="${customEntry.url?xhtml}"
103 title="${customEntry.url?xhtml}"
104 aria-label="${customEntry.url?xhtml}">${TextoEnlace}</a>
105 </#if>
106 </p>
107 </#if>
108 </div>
109 </#list>
110 </div>
111
112 <script>
113 $('.infoSlick').slick({
114 infinite: false,
115 slidesToShow: 3,
116 responsive: [
117 {
118 breakpoint: 994,/*992*/
119 settings: {
120 slidesToShow: 2
121 }
122 },
123 {
124 breakpoint: 770,
125 settings: {
126 slidesToShow: 1
127 }
128 }
129 ]
130 });
131 </script>
132</#if>