List of galleries
An error occurred while processing the template.
The following has evaluated to null or missing:
==> altImgPpal [in template "10157#10197#19695" at line 96, column 61]
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${altImgPpal} [in template "10157#10197#19695" at line 96, column 59]
----
1<#assign
2 dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")
3 dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")
4 dlUtil = staticUtil["com.liferay.document.library.kernel.util.DLUtil"]
5 maxLongContenido = 200
6 defaultLanguageId = localeUtil.toLanguageId(localeUtil.getDefault())
7 journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
8/>
9
10<#if !entries?has_content>
11
12 <#if !themeDisplay.isSignedIn()>
13 ${renderRequest.setAttribute("PORTLET_CONFIGURATOR_VISIBILITY", true)}
14 </#if>
15
16 <div class="alert alert-info">
17 <@liferay_ui["message"] key="there-are-no-results" />
18 </div>
19
20<#else>
21
22 <div class="content-cards cols-items-4 my-4">
23
24 <#list entries as entry>
25
26 <#assign
27 entry = entry
28 assetRenderer = entry.getAssetRenderer()
29 entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
30 journalArticle = assetRenderer.getArticle()
31 docXML = saxReaderUtil.read(journalArticle.getDocument().asXML())
32 viewURL = assetPublisherHelper.getBaseAssetViewURL(renderRequest, renderResponse,assetRenderer,entry)
33 resumen = entry.getSummary(locale)
34 languageId = defaultLanguageId
35 />
36
37 ${viewURL.setWindowState("maximized")}
38 ${viewURL.setParameter("redirect", portalUtil.getCurrentURL(request))}
39
40 <#if !localeUtil.equals(locale, localeUtil.getDefault())>
41 <#assign listaTraduccionesContenido = journalArticleLocalService.getArticleLocalizationLanguageIds(journalArticle.getId()) />
42 <#if listaTraduccionesContenido?seq_contains(localeUtil.toLanguageId(locale))>
43 <#assign languageId = localeUtil.toLanguageId(locale) />
44 </#if>
45 </#if>
46
47 <#if docXML.selectSingleNode("/root/dynamic-element[@field-reference='descripcion']/dynamic-content[@language-id='"+languageId+"']")?has_content>
48 <#assign descripcion = docXML.selectSingleNode("/root/dynamic-element[@field-reference='descripcion']/dynamic-content[@language-id='"+languageId+"']").getText() />
49 <#else>
50 <#assign descripcion = "" />
51 </#if>
52
53 <#if docXML.selectSingleNode("/root/dynamic-element[@field-reference='imagen']/dynamic-content[@language-id='"+languageId+"']")?has_content>
54 <#assign imgPpal = docXML.selectSingleNode("/root/dynamic-element[@field-reference='imagen']/dynamic-content[@language-id='"+languageId+"']").getText() />
55 <#if imgPpal?has_content>
56 <#assign jsonDlFileEntryImg = jsonFactoryUtil.createJSONObject(imgPpal) />
57 <#if !jsonDlFileEntryImg?has_content || !jsonDlFileEntryImg.getString("groupId")?has_content>
58 <#assign imgPpal = "" />
59 <#else>
60 <#assign altImgPpal = descripcion />
61 </#if>
62 </#if>
63 </#if>
64
65 <#if (!imgPpal?has_content) && (docXML.selectNodes("//dynamic-element[@field-reference='imagen_galeria']/dynamic-content[@language-id='"+languageId+"']")?has_content)>
66 <#assign imgPpal = docXML.selectNodes("//dynamic-element[@field-reference='imagen_galeria']/dynamic-content[@language-id='"+languageId+"']")[0].getText() />
67 <#if imgPpal?has_content>
68 <#assign jsonDlFileEntryImg = jsonFactoryUtil.createJSONObject(imgPpal) />
69 <#if !jsonDlFileEntryImg?has_content || !jsonDlFileEntryImg.getString("groupId")?has_content>
70 <#assign imgPpal = "" />
71 <#else>
72 <#if docXML.selectNodes("//dynamic-element[@field-reference='descImagen']/dynamic-content[@language-id='"+languageId+"']")?has_content>
73 <#assign altImgPpal = docXML.selectNodes("//dynamic-element[@field-reference='descImagen']/dynamic-content[@language-id='"+languageId+"']")[0].getText() />
74 </#if>
75 </#if>
76 </#if>
77 </#if>
78
79 <div class="cont-card cont-noti-home">
80
81 <div class="float-right">
82 <@getPrintIcon />
83 <@getFlagsIcon />
84 <@getEditIcon />
85 </div>
86
87 <#if imgPpal?has_content &&
88 dLFileEntryLocalService.fetchFileEntry(jsonDlFileEntryImg.getString("uuid"),jsonDlFileEntryImg.getString("groupId")?number)??>
89
90 <#assign
91 fileEntryImg = dLAppLocalService.getFileEntryByUuidAndGroupId(jsonDlFileEntryImg.getString("uuid"),jsonDlFileEntryImg.getString("groupId")?number)
92 urlImg = dlUtil.getPreviewURL(fileEntryImg, fileEntryImg.getFileVersion(), themeDisplay, "")
93 />
94
95 <div class="cont-img">
96 <img alt="${altImgPpal}" title="${altImgPpal}" src="${urlImg}" />
97 </div>
98
99 </#if>
100
101 <#--<@getMetadataField fieldName = "author" />-->
102
103 <div class="p-3">
104
105 <div class="sed-fecha">
106 <i class="fa-solid fa-calendar-days mr-2"></i><span><@getMetadataField fieldName = "modified-date" /></span>
107 </div>
108
109 <p class="m-0">
110 <a href="${viewURL}" class="enlace-total tit-noti txt-20 elipsis-2" title="<@liferay.language key="read-more" /> <@liferay.language key="about" /> ${entryTitle}">
111 <#if (entryTitle?length > maxLongContenido)>
112 ${stringUtil.shorten(entryTitle, maxLongContenido)}...
113 <#else>
114 ${entryTitle}
115 </#if>
116 </a>
117 </p>
118
119 <p class="mb-0 elipsis-5">
120 <#if !descripcion?has_content>
121 ${resumen}
122 <#else>
123 ${stringUtil.shorten(descripcion, maxLongContenido)}
124 </#if>
125 </p>
126
127 </div>
128
129 </div>
130
131 </#list>
132
133 </div>
134
135</#if>
136
137<#macro getEditIcon>
138 <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())>
139 <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("NORMAL"), themeDisplay.getURLCurrent())!"" />
140
141 <#if validator.isNotNull(editPortletURL)>
142 <#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) />
143
144 <@liferay_ui["icon"]
145 cssClass="icon-monospaced visible-interaction"
146 icon="pencil"
147 markupView="lexicon"
148 message=title
149 url=editPortletURL.toString()
150 />
151 </#if>
152 </#if>
153</#macro>
154
155<#macro getFlagsIcon>
156 <#if getterUtil.getBoolean(enableFlags)>
157 <@liferay_flags["flags"]
158 className=entry.getClassName()
159 classPK=entry.getClassPK()
160 contentTitle=entry.getTitle(locale)
161 label=false
162 reportedUserId=entry.getUserId()
163 />
164 </#if>
165</#macro>
166
167<#macro getMetadataField
168 fieldName
169>
170 <#if stringUtil.split(metadataFields)?seq_contains(fieldName)>
171 <span class="metadata-entry metadata-${fieldName}">
172 <#assign dateFormat = "dd/MM/yyyy" />
173
174 <#if stringUtil.equals(fieldName, "author")>
175 <@liferay.language key="by" /> ${htmlUtil.escape(portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName()))}
176 <#elseif stringUtil.equals(fieldName, "categories")>
177 <@liferay_asset["asset-categories-summary"]
178 className=entry.getClassName()
179 classPK=entry.getClassPK()
180 portletURL=renderResponse.createRenderURL()
181 />
182 <#elseif stringUtil.equals(fieldName, "create-date")>
183 ${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale)}
184 <#elseif stringUtil.equals(fieldName, "expiration-date")>
185 ${dateUtil.getDate(entry.getExpirationDate(), dateFormat, locale)}
186 <#elseif stringUtil.equals(fieldName, "modified-date")>
187 ${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale)}
188 <#elseif stringUtil.equals(fieldName, "priority")>
189 ${entry.getPriority()}
190 <#elseif stringUtil.equals(fieldName, "publish-date")>
191 ${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale)}
192 <#elseif stringUtil.equals(fieldName, "tags")>
193 <@liferay_asset["asset-tags-summary"]
194 className=entry.getClassName()
195 classPK=entry.getClassPK()
196 portletURL=renderResponse.createRenderURL()
197 />
198 <#elseif stringUtil.equals(fieldName, "view-count")>
199 ${entry.getViewCount()} <@liferay.language key="views" />
200 </#if>
201 </span>
202 </#if>
203</#macro>
204
205<#macro getPrintIcon>
206 <#if getterUtil.getBoolean(enablePrint)>
207 <#assign printURL = renderResponse.createRenderURL() />
208
209 ${printURL.setParameter("mvcPath", "/view_content.jsp")}
210 ${printURL.setParameter("assetEntryId", entry.getEntryId()?string)}
211 ${printURL.setParameter("viewMode", "print")}
212 ${printURL.setParameter("type", entry.getAssetRendererFactory().getType())}
213 ${printURL.setWindowState("pop_up")}
214
215 <#assign title = languageUtil.format(locale, "print-x", entryTitle, false) />
216
217 <div aria-label="${title}">
218 <@clay["button"]
219 cssClass="btn btn-outline-borderless btn-outline-secondary btn-sm lfr-portal-tooltip"
220 displayType="secondary"
221 icon="print"
222 markupView="lexicon"
223 onClick="javascript:Liferay.Util.openModal({headerHTML: '" + title + "', url: '" + printURL.toString() + "'});"
224 title="${title}"
225 />
226 </div>
227 </#if>
228</#macro>
Showing 1 to 4 of 72 entries.