Se ha producido un error al procesar la plantilla.
Can't convert this string to number: "" The blamed expression: ==> img?keep_after("documents/")?keep_before("/")?number [in template "20097#20123#36200939" at line 201, column 22] ---- FTL stack trace ("~" means nesting-related): - Failed at: groupIdImage = img?keep_after("docume... [in template "20097#20123#36200939" at line 201, column 7] ----
1<style>
2 .adt-eventos-ci-fila {
3 justify-content: center;
4 }
5 .adt-eventos-ci-columna {
6 justify-content: center;
7 flex-wrap: wrap;
8 }
9 .adt-eventos-ci-target {
10 width: 95%;
11 max-width: 340px;
12 margin: 10px 5px;
13 }
14 .adt-eventos-encabezado {
15 position: relative;
16 }
17 .adt-eventos-ci-target p {
18 margin: 0;
19 }
20 .adt-eventos-ci-target-categoria {
21 background-color: rgba(209, 21, 24, 0.8);
22 color: #ffffff;
23 width: 70%;
24 position: absolute;
25 margin-top: -40px;
26 }
27 .adt-eventos-ci-target-categoria p {
28 padding: 2.7px 0;
29 text-align: center;
30 font-weight: bold;
31 font-size: 16px;
32 text-transform: uppercase;
33 }
34 .adt-eventos-ci-target-contenido {
35 height:345px;
36 border-bottom-left-radius: 20px;
37 border-bottom-right-radius: 20px;
38 }
39 .adt-eventos-ci-target-contenido-texto {
40 padding: 1rem;
41 height:220px;
42 }
43 .adt-eventos-ci-target-contenido-texto #titulo {
44 font-size: 17px;
45 font-weight: 600;
46 margin-bottom: 5px;
47 line-height:25px;
48 }
49 .adt-eventos-ci-target-contenido-texto p {
50 font-size: 14px ;
51 }
52
53 .adt-eventos-ci-target-contenido-texto a {
54 text-decoration: none;
55 color: #000000;
56 }
57 .adt-eventos-ci-target-contenido-info {
58 justify-content: center;
59 flex-direction:column;
60 padding: 5px 10px 20px;
61 }
62 .adt-eventos-ci-target-contenido-info a{
63 color:#000000;
64 }
65 .adt-eventos-ci-target-contenido-info #hora,
66 .adt-eventos-ci-target-contenido-info #lugar,
67 .adt-eventos-ci-target-contenido-info #fecha {
68 width: 100%;
69 flex-direction: row;
70 align-items: center;
71 margin: 5px 10px;
72
73 }
74 .adt-eventos-ci-target-contenido-info #hora #p-hora,
75 .adt-eventos-ci-target-contenido-info #fecha #p-fecha{
76 flex-direction: column;
77 }
78 .adt-eventos-ci-target-contenido-info img {
79 width: 24px !important;
80 margin-right: 10px;
81 }
82 .adt-eventos-ci-target-contenido-info p {
83 font-size: 13px;
84 }
85 .d-f {
86 display: flex;
87 }
88 .border-left {
89 width: 2px;
90 height: auto;
91 border-width: 0;
92 color: #d9d9d9;
93 background-color: #d9d9d9;
94 }
95 .border-2 {
96 border: 2px solid #d9d9d9;
97 }
98 @media (max-width:400px){
99 .adt-eventos-ci-target-contenido,
100 .adt-eventos-ci-target-contenido-texto{
101 height:fit-content;
102 }
103 .adt-eventos-ci-target-contenido-info {
104 flex-direction:column;
105 justify-content: center;
106 padding: 1rem;
107 }
108 .border-left{
109 display:none;
110 }
111 .adt-eventos-ci-target-contenido-info #hora,
112 .adt-eventos-ci-target-contenido-info #lugar,
113 .adt-eventos-ci-target-contenido-info #fecha {
114 flex-direction: row;
115 align-items:center;
116 margin: 0;
117 }
118 .adt-eventos-ci-target-contenido-info img {
119 margin-bottom: 0;
120 }
121 .adt-eventos-ci-target-contenido-info #hora #p-hora,
122 .adt-eventos-ci-target-contenido-info #fecha #p-fecha,
123 .adt-eventos-ci-target-contenido-info #lugar p{
124 margin: 5px 8px;
125 }
126 .adt-eventos-ci-target-contenido-info #lugar p{
127 text-align:left;
128 }
129 }
130</style>
131<#-- Truncate Text -->
132<#macro truncate_text text limit>
133<#assign truncatedText="" />
134<#if text?length gt limit>
135<#assign truncatedText=text?substring(0,limit) />
136<#assign truncatedText=truncatedText + "..." />
137${truncatedText}
138<#else>
139${text}
140</#if>
141</#macro>
142
143<div class="search-total-label">
144 ${languageUtil.format(locale, "x-results-for-x", [searchContainer.getTotal(), "<strong>" + htmlUtil.escape(searchResultsPortletDisplayContext.getKeywords()) + "</strong>"], false)}
145</div>
146
147<div class="adt-eventos-ci-container">
148 <div class="adt-eventos-ci-fila d-f">
149 <div class="adt-eventos-ci-columna d-f">
150 <#if entries?has_content>
151 <#list entries as entry>
152 <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
153 info_art2 = journalArticleLocalService.getLatestArticle(entry.getClassPK())
154 dlFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")
155 document = saxReaderUtil.read(info_art2.getContent())
156 key = info_art2.getResourcePrimKey()
157 AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")
158 rootElement = document.getRootElement()
159 categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", key)
160 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='fecha' ]")
161 news_fecha=xPathSelector.selectSingleNode(rootElement).getStringValue()
162 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='descripcion' ]")
163 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='ubicacion' ]")
164 ubication=xPathSelector.selectSingleNode(rootElement).getStringValue()
165 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='horainicio' ]")
166 hora1=xPathSelector.selectSingleNode(rootElement).getStringValue()
167 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='horafin' ]")
168 hora2=xPathSelector.selectSingleNode(rootElement).getStringValue()
169 xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='opcPagExt']")
170 opcionPag = xPathSelector.selectSingleNode(rootElement).getStringValue()
171 xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='urlExterna']")
172 urlExt = xPathSelector.selectSingleNode(rootElement).getStringValue()
173 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='tipoevento' ]")
174 tipo=xPathSelector.selectSingleNode(rootElement).getStringValue()
175 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='URLvirtual' ]")
176 virtual=xPathSelector.selectSingleNode(rootElement).getStringValue()
177 xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='fecha']")
178 fecha1_x = xPathSelector.selectSingleNode(rootElement).getStringValue()
179 xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='fechafinal']")
180 fecha2_x = xPathSelector.selectSingleNode(rootElement).getStringValue()
181 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='latitud' ]")
182 lat=xPathSelector.selectSingleNode(rootElement).getStringValue()
183 latSinEsp=lat?replace(" ", "")?replace("\n", "")?replace("\t", "")
184 xPathSelector=saxReaderUtil.createXPath("dynamic-element[@name='longitud' ]")
185 long=xPathSelector.selectSingleNode(rootElement).getStringValue()
186 longSinEsp=long?replace(" ", "")?replace("\n", "")?replace("\t", "")
187 />
188 <#assign fecha1 = fecha1_x?replace(" ", "")?replace("\n", "")?replace("\t", "")?date.xs/>
189 <#assign fecha2 = fecha2_x?replace(" ", "")?replace("\n", "")?replace("\t", "")?date.xs/>
190 <#if journalArticleLocalService.getLatestArticle(entry.getClassPK()).getArticleImageURL(themeDisplay)?has_content>
191 <#assign img = journalArticleLocalService.getLatestArticle(entry.getClassPK()).getArticleImageURL(themeDisplay) />
192 </#if>
193 <#if opcionPag?contains("si")>
194 <#assign viewURL="${urlExt}"/>
195 <#else>
196 <#assign viewURL="${entry.getViewURL()}"/>
197 </#if>
198 <#if img?has_content>
199 <#assign
200 uuid1=img?keep_before("?")?keep_after_last("/")
201 groupIdImage = img?keep_after("documents/")?keep_before("/")?number
202 step1 = dlFileEntryService.getFileEntryByUuidAndGroupId(uuid1, groupIdImage)
203 />
204 </#if>
205
206 <div class="adt-eventos-ci-target">
207 <div class="adt-eventos-encabezado">
208 <#if img?has_content>
209 <!--asignar descripción en texto alt si tiene, y si no que muestre el mismo titulo de la imagen-->
210 <#if step1.getDescription()?has_content>
211 <img src="${img}" alt="${step1.getDescription()}" style="width: 100%; position: relative; border-top-left-radius: 20px; border-top-right-radius: 20px; aspect-ratio:11/4;"/>
212 <#else>
213 <img src="${img}" alt="${step1.getTitle()}" style="width: 100%; position: relative; border-top-left-radius: 20px; border-top-right-radius: 20px; aspect-ratio:11/4;"/>
214 </#if>
215 <!--termina el alt y sigue con condicional de agregar logo UN en caso de que no tenga imagen destacada por mostrar-->
216 <#else>
217 <img src="https://www.uninorte.edu.co/documents/14120459/14911168/Logo_Uninorte.png/1fee375c-5a6d-f0dd-b431-67d8caeea04d?t=1677083900695" alt="Uninorte logo" style="width: 100%; position: relative; border-top-left-radius: 20px; border-top-right-radius: 20px; aspect-ratio:11/4;"/>
218 </#if>
219 <div class="adt-eventos-ci-target-categoria">
220 <p><#if categories?has_content>
221 <#list categories as category>
222 <#if category?contains("Académicos") || category?contains("Ceremoniales") || category?contains("Culturales") || category?contains("Deportivos") || category?contains("Empresariales") || category?contains("Grados") || category?contains("Home") || category?contains("Internacionalización")|| category?contains("Investigación") || category?contains("Recomendados")>
223 <div class="adt-noticias-1-target-categoria">
224 <p>${category.getName()}</p>
225 </div>
226 <#break>
227 </#if>
228 </#list>
229 </#if></p>
230
231 </div>
232 </div>
233 <div class="adt-eventos-ci-target-contenido border-2">
234 <div class="adt-eventos-ci-target-contenido-texto">
235 <a href="${viewURL}">
236 <h2 id="titulo">
237 ${stringUtil.shorten(entry.getHighlightedTitle(), 100)}
238 </h2>
239 </a>
240 <p id="descripcion">
241 <#if info_art2.getDescription()?has_content>
242 ${stringUtil.shorten(info_art2.getDescription(), 195)}
243 </#if>
244 </p>
245 </div>
246 <div class="adt-eventos-ci-target-contenido-info d-f">
247
248 <div class="d-f" id="fecha">
249 <img
250 src="https://www.uninorte.edu.co/documents/15916181/30396914/calendario.png/d29504bd-eeb0-6b22-84c9-7ff79262a873?t=1663686871125"
251 alt="Calendario"
252 />
253 <div class="d-f" id="p-fecha">
254
255
256 <#if fecha1 == fecha2>
257 <#-- Fecha 1 -->
258 <#if fecha1?contains("Jan")>
259 <#assign date1=fecha1?replace("Jan", "Ene" ) />
260 <#elseif fecha1?contains("Apr")>
261 <#assign date1=fecha1?replace("Apr", "Abr" ) />
262 <#elseif fecha1?contains("Aug")>
263 <#assign date1=fecha1?replace("Aug", "Ago" ) />
264 <#elseif fecha1?contains("Dec")>
265 <#assign date1=fecha1?replace("Dec", "Dic" ) />
266 <#else>
267 <#assign date1=fecha1 />
268 </#if>
269 <p>${date1}</p>
270 <#else>
271
272 <#-- Fecha 1 -->
273 <#if fecha1?contains("Jan")>
274 <#assign date1=fecha1?replace("Jan", "Ene" ) />
275 <#elseif fecha1?contains("Apr")>
276 <#assign date1=fecha1?replace("Apr", "Abr" ) />
277 <#elseif fecha1?contains("Aug")>
278 <#assign date1=fecha1?replace("Aug", "Ago" ) />
279 <#elseif fecha1?contains("Dec")>
280 <#assign date1=fecha1?replace("Dec", "Dic" ) />
281 <#else>
282 <#assign date1=fecha1 />
283 </#if>
284
285 <#-- Fecha 2 -->
286 <#if fecha2?contains("Jan")>
287 <#assign date2=fecha2?replace("Jan", "Ene" ) />
288 <#elseif fecha2?contains("Apr")>
289 <#assign date2=fecha2?replace("Apr", "Abr" ) />
290 <#elseif fecha2?contains("Aug")>
291 <#assign date2=fecha2?replace("Aug", "Ago" ) />
292 <#elseif fecha2?contains("Dec")>
293 <#assign date2=fecha2?replace("Dec", "Dic" ) />
294 <#else>
295 <#assign date2=fecha2 />
296 </#if>
297
298 <p> ${date1}- ${date2}</p>
299
300 </#if>
301 </div>
302 </div>
303
304 <div class="d-f" id="hora">
305 <img
306 src="https://www.uninorte.edu.co/documents/15916181/30396914/reloj-de-pared.png/fe5ed88c-a1cd-cfd8-70f6-0b748630938c?t=1663686871005"
307 alt="Reloj"
308 />
309 <div class="d-f" id="p-hora">
310 <p>${hora1} - ${hora2}</p>
311 </div>
312 </div>
313
314 <div class="d-f" id="lugar">
315 <img
316 src="https://www.uninorte.edu.co/documents/15916181/30396914/sitio.png/148a5fc1-41d5-5bca-1878-ff8c1ea572e2?t=1663687797750"
317 alt="Ubicacion"
318 />
319
320 <#if tipo?contains("no")>
321 <#if latSinEsp == "" || longSinEsp == "">
322 <p>${ubication}</p>
323 <#else>
324 <#assign linkMaps = "https://www.google.com/maps?q=${lat},${long}&hl=es-PY&gl=py&shorturl=1"/>
325 <a href="${linkMaps}"><p>${ubication}</p></a>
326 </#if>
327 <#elseif tipo?contains("si")>
328 <a href="${virtual}">
329 <p>Evento virtual</p>
330 </a>
331 <#else>
332 <p>Bimodal</p>
333 </#if>
334 </div>
335 </div>
336 </div>
337 </div>
338 </#list>
339 </#if>
340 </div>
341 </div>
342</div>