Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> request.getParameter("articulo") [in template "20096#20122#7614223" at line 139, column 25]
----
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: #assign myParamValue = request.getPar... [in template "20096#20122#7614223" at line 139, column 1]
----
1<style>
2 .aecid-detalle a {
3 color: var(--brand-color-1);
4 }
5
6 .aecid-detalle a:hover,
7 .aecid-detalle .share-option:hover {
8 opacity: .5;
9 }
10
11 .aecid-detalle h1 {
12 font-weight: 700;
13 font-size: 2.438rem;
14 line-height: 2.938rem;
15 color: var(--brand-color-1);
16 }
17
18 .aecid-detalle .col-lg-8 {
19 border-right: 1px solid #A09899;
20 padding-right: 3rem;
21 }
22
23 .aecid-detalle .col-lg-4 {
24 padding-left: 3rem;
25 }
26
27 .aecid-detalle .col-lg-4 .tituloPeq:first-child {
28 margin-top: 0!important;
29 }
30
31 .fecha {
32 font-weight: 400!important;
33 font-size: 1.25rem!important;
34 line-height: 1.5rem!important;
35 display: block!important;
36 margin: 0.625rem 0!important;
37 text-transform: uppercase!important;
38 }
39
40 .catTematica {
41 display: inline-block;
42 padding: 0.313rem 0.625rem;
43 background: #F6F2F3;
44 border-radius: 0.625rem;
45 font-weight: 400;
46 font-size: 1.25rem;
47 line-height: 1.5rem;
48 color: #000000;
49 margin: 0.625rem 0;
50 text-transform: uppercase;
51 }
52
53 .resumen {
54 color: #6f6f6f;
55 font-size: 0.9em;
56 }
57
58 .aecid-detalle iframe {
59 width: 100%;
60 height: 30em;
61 }
62
63 .contenido {
64 font-family: Barlow;
65 }
66
67 .contenido img {
68 margin-left: 0 !important;
69 max-width: 100% !important;
70 height: auto;
71 }
72
73 .pieFoto {
74 font-size: 14px;
75 }
76
77 .botonRRSS {
78 display: inline-block;
79 color: #fff;
80 vertical-align: middle;
81 cursor: pointer;
82 -webkit-user-select: none;
83 -moz-user-select: none;
84 user-select: none;
85 background-color: transparent;
86 border: 1px solid transparent;
87 padding: 0.375rem 0.75rem;
88 border-radius: 0.25rem;
89 transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
90 }
91
92 .share-option {
93 background-color: transparent;
94 border: none;
95 padding: 0;
96 }
97
98 .fb-xfbml-parse-ignore {
99 background-color: transparent;
100 border: none;
101 }
102
103 .fb-xfbml-parse-ignore:hover {
104 opacity: .5;
105 }
106
107 .mainImg {
108 max-height: 21rem;
109 object-fit: cover;
110 width: auto;
111 max-width: 100%;
112 margin-bottom: 40px;
113 }
114
115 .tituloPeq {
116 font-weight: 600!important;
117 font-size: 1.5rem!important;
118 line-height: 1.875rem!important;
119 color: black!important;
120 text-transform: uppercase!important;
121 margin-top: 2.5rem!important;
122 }
123
124 @media screen and (max-width: 991px) {
125 .aecid-noticia {
126 padding-left: 10px;
127 padding-right: 10px;
128 }
129
130 .aecid-detalle .col-lg-4, .aecid-detalle .col-lg-8 {
131 padding-left: 0;
132 padding-right: 0;
133 border: none;
134 }
135 }
136</style>
137
138
139<#assign myParamValue = request.getParameter("articulo")>
140<#assign grupostr = request.getParameter("sitio")>
141<#assign grupolong = grupostr?number >
142
143<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
144<#assign journalArticleResourceLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService") />
145<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
146<#assign articleId = request.getParameter("articulo")>
147<#assign article = journalArticleLocalService.getArticle(grupolong, articleId)>
148<#assign AssetCategoryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
149<#assign categories=AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", article.getResourcePrimKey()) />
150<#assign articleResource = journalArticleResourceLocalService.getArticleResource(article.getResourcePrimKey())>
151<#assign articleResourcePK = articleResource.getPrimaryKey()>
152<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
153<#assign assetCategoryPropertyLocalService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService")>
154<#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", articleResourcePK) />
155<#assign assetEntryId = assetEntry.getEntryId() />
156
157<!-- Funciones -->
158<#function getJournalArticleRootElement journal>
159 <#attempt>
160 <#if journal?has_content>
161 <#local journalLocaleContent = journal.getContentByLocale(locale.toString()) />
162 <#local journalContentXml = saxReaderUtil.read(journalLocaleContent) />
163 <#local rootElementContent = journalContentXml.getRootElement() />
164 <#if rootElementContent?? && rootElementContent?has_content>
165 <#return rootElementContent />
166 </#if>
167 </#if>
168 <#recover >
169 </#attempt>
170 <#return "" />
171</#function>
172
173<#function getXmlTextElement rootElementContent fieldReference>
174 <#attempt>
175 <#local xPathSelector = saxReaderUtil.createXPath("dynamic-element[@field-reference='" + fieldReference + "']") />
176 <#local element = xPathSelector.selectSingleNode(rootElementContent) />
177 <#return element.getStringValue()?trim />
178 <#recover >
179 </#attempt>
180 <#return "" />
181</#function>
182
183<#function getXmlTextElement rootElementContent fieldReference>
184 <#attempt>
185 <#local xPathSelector = saxReaderUtil.createXPath("dynamic-element[@field-reference='" + fieldReference + "']") />
186 <#local element = xPathSelector.selectSingleNode(rootElementContent) />
187 <#return element.getStringValue()?trim />
188 <#recover >
189 </#attempt>
190 <#return "" />
191</#function>
192
193<#function getJournalArticle resourcePrimKey>
194 <#attempt>
195 <#local journal = journalArticleLocalService.getLatestArticle(resourcePrimKey, 0) />
196 <#return journal />
197 <#recover >
198 </#attempt>
199 <#return "" />
200</#function>
201
202<#function getJournalArticleByJsonElement elementJson>
203 <#attempt>
204 <#local resourcePrimKey = elementJson.classPK?number />
205 <#local journal = getJournalArticle(resourcePrimKey) />
206 <#return journal />
207 <#recover >
208 </#attempt>
209 <#return "" />
210</#function>
211
212<#function obtenerCamposRepetidos documentRoot fieldReference >
213 <#return documentRoot.selectNodes("dynamic-element[@field-reference='" + fieldReference + "']")/>
214</#function>
215
216<#function getFriendlyUrlJournal journal>
217 <#return "/-/" + journal.getUrlTitle() />
218</#function>
219
220<#function removeUrlParams url>
221 <#if url?contains("?") >
222 <#return url?substring(0, url?index_of("?")) />
223 </#if>
224 <#return url/>
225</#function>
226
227<#macro fechaPublicacionJournal pattern="MMMM '|' dd '|' yyyy" upperCase=true>
228 <#local date = getJournalArticleDisplayDate(article) />
229 <#if date?has_content>
230 <#local dateFormat = formatDate(date, pattern) />
231 ${upperCase?then(dateFormat?upper_case, dateFormat)}
232 </#if>
233</#macro>
234
235<#function getJournalArticleDisplayDate articulo>
236 <#local journalArticleDisplayDateF = "">
237 <#attempt>
238 <#local journalArticleDisplayDate = articulo.getDisplayDate() />
239 <#if journalArticleDisplayDate?has_content>
240 <#local journalArticleDisplayDateF = journalArticleDisplayDate />
241 <#local date = dateUtil.parseDate("EEE, dd MMM yyyy HH:mm:ss Z", journalArticleDisplayDate, localeUtil.getDefault()) />
242 <#local journalArticleDisplayDateF = date />
243 </#if>
244 <#recover>
245 </#attempt>
246 <#return journalArticleDisplayDateF />
247</#function>
248
249<#function formatDate date datePattern="EEEE, dd MMMM yyyy HH:mm">
250 <#attempt>
251 <#local timeZoneMadrid = timeZoneUtil.getTimeZone("Europe/Madrid") />
252 <#local dateFormat = dateUtil.getDate(date, datePattern, locale, timeZoneMadrid) />
253 <#return dateFormat />
254 <#recover>
255 </#attempt>
256 <#return "" />
257</#function>
258
259<#-- Construir la URL actual -->
260<#assign currentURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() />
261<#-- Comprobar si existe el servicio de shortener -->
262<#if (serviceLocator.findService("es.aecid.shorturl.service.AecidShortUrlService"))??>
263 <#assign shortUrlService = serviceLocator.findService("es.aecid.shorturl.service.AecidShortUrlService") />
264 <#assign currentShortURL = themeDisplay.getPortalURL() + "/" + shortUrlService.getShortUrl(currentURL, companyId, groupId, themeDisplay.getUserId()) />
265<#else>
266 <#-- Escapamos la URL para HTML (incluye reemplazo de &) -->
267 <#assign currentShortURL = currentURL?replace("&", "%26") />
268 <#assign currentShortURL = currentShortURL?html />
269</#if>
270
271<!-- obtener los datos de los campos -->
272<#assign journalRootElement = getJournalArticleRootElement(article) />
273<#assign contenido = article.getContent() />
274
275<#if journalRootElement?has_content>
276 <#assign video = getXmlTextElement(journalRootElement, "video") />
277 <#assign Resumen = getXmlTextElement(journalRootElement, "resumen") />
278 <#assign Imagen = getXmlTextElement(journalRootElement, "image") />
279 <#assign Contenido = getXmlTextElement(journalRootElement, "content") />
280</#if>
281
282<#assign redirectUrl = paramUtil.getString(request, "redirect", "") />
283<a class="back-button" href="${redirectUrl}">
284 <svg class="lexicon-icon lexicon-icon-angle-left" role="presentation"><use xlink:href="https://haiti.aecid.es/o/aecid-oces-theme/images/clay/icons.svg#angle-left"></use></svg>
285 <span class="sr-only">Atrás</span>
286</a>
287
288<div id="aecid-detalle-noticia" class="container p-0 aecid-detalle mt-5 mb-5">
289 <div class="row aecid-noticia px-3 px-md-0">
290 <div class="col-lg-8 col-12 row pl-0">
291 <h1 tabindex="0">${article.getTitle(locale)}</h1>
292 <p class="resumen" tabindex="0"><span class="sr-only"> ${languageUtil.get(locale, "resumen.de.la.noticia")} </span>
293 <#if Resumen??>
294 ${Resumen}
295 </#if>
296 </p>
297
298 <#assign jsonFactory = serviceLocator.findService("com.liferay.portal.kernel.json.JSONFactory")>
299 <#assign jsonObject = jsonFactory.createJSONObject(Imagen)>
300 <#assign urlImagen = jsonObject.getString("url")>
301 <#assign urlImagenAlt = jsonObject.getString("alt")>
302
303 <#assign ImagenRedes = "/documents/d/global/noticias-convocatoria">
304 <#if (video?has_content)>
305 <div class="col-12 p-0">
306 <div class="row justify-content-center">
307 <div class="col-12 p-0">
308 <#if video?contains("www.youtube.com/embed/")>
309 <iframe
310 title="Reproductor de vídeo YouTube" src="${video}" frameborder="0"
311 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
312 allowfullscreen>
313 </iframe>
314
315 <#elseif video?contains("www.youtube.com/") && video?split("/")?size gte 2>
316 <#assign enlaceIframe = "" >
317 <#if video?contains("watch")>
318 <#assign enlaceIframe = video?split("/")[3]?split("watch?v=")[1] >
319 <#else>
320 <#assign enlaceIframe = video?split("/")[3]>
321 </#if>
322 <iframe title="Reproductor de vídeo YouTube"
323 src="https://www.youtube.com/embed/${enlaceIframe}"
324 frameborder="0"
325 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
326 allowfullscreen>
327 </iframe>
328
329 <#elseif video?contains("youtu.be")>
330 <a href="${friendlyURLs[themeDisplay.getLanguageId()]!""}" title="${languageUtil.get(locale, "lleva.a.pagina")} ${article.getTitle(locale)?truncate(100, '...')}">
331 <iframe tabindex="0" height="210px" title="Reproductor de vídeo YouTube"
332 src="https://www.youtube.com/embed/${video?split("/")[3]}?showinfo=0"
333 frameborder="0"
334 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
335 allowfullscreen>
336 </iframe>
337 </a>
338
339 <#elseif video?contains("vimeo") && video?split("/")?size gte 2>
340 <iframe title="Reproductor de vídeo Vimeo"
341 src="https://player.vimeo.com/video/${video?split("/")[3]}?"
342 frameborder="0" allow="autoplay; fullscreen; picture-in-picture"
343 allowfullscreen>
344 </iframe>
345 </#if> <!-- Asegura que este cierre esté presente -->
346 </div>
347 </div>
348 </div>
349 <#else>
350 <#assign jsonFactory = serviceLocator.findService("com.liferay.portal.kernel.json.JSONFactory")>
351 <#assign jsonObject = jsonFactory.createJSONObject(Imagen)>
352 <#assign urlImagen = jsonObject.getString("url")>
353 <#assign urlImagenAlt = jsonObject.getString("alt")>
354 <div class="col-12 p-0">
355 <#if urlImagen?has_content>
356 <img alt="${urlImagenAlt}" src="${urlImagen}" class="mainImg w-100" />
357 <#assign ImagenRedes = jsonObject.getString("url")>
358 <#else>
359 <img alt="Logo de AECID" src="/documents/d/global/noticias-convocatoria" class="mainImg w-100" />
360 <#assign ImagenRedes = "/documents/d/global/noticias-convocatoria">
361 </#if>
362 </div>
363 </#if>
364 <div class="contenido" tabindex="0"><span class="sr-only">${languageUtil.get(locale, "contenido.de.la.noticia")} </span>
365 <#if Contenido??>
366 ${Contenido}
367 </#if>
368 </div>
369 </div>
370 <div class="col-lg-4 col-12 pr-0 flex-column justify-content-center">
371 <p class="tituloPeq">Fecha</p>
372 <div class="p-0">
373 <p class="fecha" tabindex="0"><@fechaPublicacionJournal pattern="dd/MM/yyyy - HH:mm" upperCase=false/></p>
374 </div>
375 <div class="p-0">
376 <p tabindex="0"><span class="sr-only">${languageUtil.get(locale, "categorias.de.la.noticia")}</span>
377 <span class="categoria">
378 <#if categories?has_content>
379 <p class="tituloPeq">Temática</p>
380 <#list categories as category>
381 <#assign
382 numIdCategoria=category.getTreePath()?substring(category.getTreePath()?last_index_of("/")
383 - 5 , category.getTreePath()?length - 1) />
384 <span class="catTematica">${category.getName()}</span>
385 </#list>
386 </#if>
387 </span>
388 </p>
389
390 <p class="tituloPeq">Compartir</p>
391 <div class="row col-12 p-0">
392 <!-- button visible facebook -->
393 <div class="col-flex mr-2">
394 <button class="fb-xfbml-parse-ignore" onClick="shareFacebook();" target="_blank" class="share-option"
395 index-social-media-list="0">
396 <div class="botonRRSS facebook">
397 <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1_35584)"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.6095 36H12.5774V20.6268H8V13.8902H12.5774C12.5627 12.3356 12.5774 10.781 12.6206 9.22642C12.7294 8.17188 12.9307 7.13549 13.2252 6.11723C14.3773 2.73944 16.7239 0.766828 20.264 0.201128C22.9293 -0.145201 25.5773 -0.0441522 28.2097 0.503411V6.63543C26.7398 6.50933 25.2716 6.52401 23.8051 6.67861C22.1287 7.00248 21.107 7.9957 20.739 9.65825C20.6173 11.0652 20.5741 12.4755 20.6095 13.8902H27.7779C27.359 16.1271 26.9851 18.3726 26.6551 20.6268H20.6095V36Z" fill="#0A66FF"></path></g><defs><clipPath id="clip0_1_35584"><rect width="20.2097" height="36" fill="white" transform="translate(8)"></rect></clipPath></defs></svg>
398 </div>
399 </button>
400 </div>
401 <!-- button visible twitter -->
402 <div class="col-flex mr-2">
403 <a href="https://twitter.com/intent/tweet?text=Mira esta noticia: ${article.getTitle(locale)} ${currentShortURL}"
404 class="twitter-share share-option no-ico" target="_blank" index-social-media-list="1">
405 <div class="botonRRSS twitter">
406 <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1_35585)"><path d="M28.4425 2H33.9607L21.8447 15.7954L36 34.5092H24.8917L16.1946 23.137L6.23792 34.5092H0.71976L13.5555 19.7541L0 2H11.3842L19.2416 12.3885L28.4425 2ZM26.5112 31.2702H29.5701L9.77674 5.11896H6.48984L26.5112 31.2702Z" fill="black"></path></g><defs><clipPath id="clip0_1_35585"><rect width="36" height="32.5092" fill="white" transform="translate(0 2)"></rect></clipPath></defs></svg>
407 </div>
408 </a>
409 </div>
410 </div>
411 </div>
412 </div>
413 <div class="col-2 d-lg-block d-none"></div>
414 <@liferay_util["html-top"]
415 outputKey="htmltop">
416 <!-- METAS RRSS -->
417 <meta property="og:url" content="${currentShortURL?html}" />
418 <meta property="og:site_name" content="SiteName" />
419 <meta property="og:type" content="website" />
420 <meta property="og:locale" content="gl_ES" />
421 <meta property="og:locale:alternate" content="gl_ES" />
422 <meta name="twitter:card" content="summary_large_image" />
423 <meta property="og:title" content="${article.getTitle(locale)}" />
424 <meta name="twitter:title" content="${article.getTitle(locale)}" />
425
426 <#if Resumen != "">
427 <meta property="og:description" content="${htmlUtil.stripHtml(Resumen)?replace("\"", "'" )}" />
428 <meta name="twitter:description" content="${htmlUtil.stripHtml(Resumen)?replace("\"", "'" )}" />
429 <#else>
430 <meta property="og:description" content="${article.getTitle(locale)}" />
431 <meta name="twitter:description" content="${article.getTitle(locale)}" />
432 </#if>
433
434 <meta property="og:image" content="${themeDisplay.getPortalURL()+ImagenRedes}" />
435 <meta property="og:image:secure_url" content="${themeDisplay.getPortalURL()+ImagenRedes}" />
436 <meta name="twitter:image" content="${themeDisplay.getPortalURL()+ImagenRedes}" />
437 <meta property="og:image:alt" content="Alt img og" />
438 <meta property="fb:app_id" content="???">
439 <meta property="fb:admins" content="https://www.facebook.com/Aecid.es">
440 <meta name="twitter:domain" content="${currentShortURL}" />
441 <meta name="twitter:url" content="${currentShortURL}" />
442 <meta name="twitter:site" content="@AECID_es" />
443 </@>
444
445 </div>
446</div>
447
448
449<script>
450 function shareFacebook() {
451 let urlShare = 'http://www.facebook.com/sharer.php?s=100&p[title] = ' + encodeURI('${article.getTitle(locale)} ') + '&p[summary] = Resumen & p[url] = ${currentShortURL} ';
452 let a = document.createElement('a');
453 a.target = '_blank';
454 a.href = urlShare;
455 a.click();
456 }
457</script>