Noticias Destacadas | Ayuntamiento de Valencia - València
Filtro de noticias
Temáticas
Búsqueda de noticias
Búsqueda por día
Últimas noticias
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing: ==> icono [in template "20115#20151#158259" at line 365, column 30] ---- 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: #if icono == "audio" [in template "20115#20151#158259" at line 365, column 25] ----
1<#assign liferay_theme = PortletJspTagLibs["/META-INF/liferay-theme.tld"] />
2<@liferay_theme["defineObjects"] />
3<#assign themeRootPath = themeDisplay.getPathThemeRoot() />
4<#assign themeImagesPath = themeDisplay.getPathThemeImages() />
5<#assign dlAppServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService") />
6<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
7<#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
8<#assign lang = themeDisplay.getLocale()>
9<#assign commonUtilsApi =serviceLocator.findService("com.valencia.liferay.common.utils.api.CommonUtilsApi")/>
10
11<script>
12$(document).ready(function(){
13 $(".slider-img").parent().parent().show();
14$(".slider-img").parent().show();
15});
16
17 if(window.hasOwnProperty("define") && define.amd){
18 define._amd = define.amd;
19 define.amd = false;
20 }
21</script>
22<script src="${themeRootPath}/js/lightslider.min.js"></script>
23<script src="${themeRootPath}/js/ekko-lightbox.js"></script>
24<link type="text/css" rel="stylesheet" href="${themeRootPath}/css/ext/lightslider.min.css" />
25<link type="text/css" rel="stylesheet" href="${themeRootPath}/css/ext/ekko-lightbox.css" />
26<script>
27 if(window.hasOwnProperty("define") && define._amd){
28 define.amd = define._amd;
29 }
30</script>
31
32
33<!-- variables -->
34<#assign currentUrl = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() />
35<#assign urlArticle = .vars['reserved-article-url-title'].data />
36<#assign urlArticleNoContext = themeDisplay.getPortalURL() + "/-/" + urlArticle />
37<#assign publishedDate = .vars['reserved-article-create-date'].data />
38<#assign title = .vars['reserved-article-title'].data />
39<#assign description = .vars['reserved-article-description'].data />
40<#assign contentId = .vars['reserved-article-id'].data>
41<#assign liferay_ui = taglibLiferayHash["/META-INF/liferay-ui.tld"] />
42<#assign liferay_portlet = taglibLiferayHash["/META-INF/liferay-portlet-ext.tld"] />
43<#assign vocabularyID = getterUtil.getLong(156752) />
44<#assign backUrl = "" />
45<#if request.getHeader("Referer")?? >
46 <#assign backUrl = request.getHeader("Referer") />
47</#if>
48
49<#if backUrl?contains("/buscador")>
50 <#assign redirectSessionAttr = (request.getSession().getAttribute("LIFERAY_SHARED_redirectToBuscador")??)?then(request.getSession().getAttribute("LIFERAY_SHARED_redirectToBuscador"),"")/>
51 <#if redirectSessionAttr != "" >
52 <#assign backUrl = redirectSessionAttr />
53 </#if>
54</#if>
55
56
57<#assign journalArticleClassname = "com.liferay.journal.model.JournalArticle" >
58<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
59<#assign AssetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") />
60<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
61<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
62<#assign scopeId = .vars['scopeGroupId'] />
63
64<#assign journalArticle = JournalArticleLocalService.fetchArticle(getterUtil.getLong(scopeId), contentId)>
65<#assign journaArticleEntry = AssetEntryLocalService.getEntry(journalArticleClassname, journalArticle.getResourcePrimKey())>
66<#assign categorys = assetCategoryService.getAssetEntryAssetCategories(journaArticleEntry.getEntryId()) >
67<#assign categoryId = categorys[0].getCategoryId() >
68<#assign categoryName = categorys[0].getTitle(lang) >
69<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() />
70<#assign httpServletRequest = serviceContext.getRequest()>
71
72<#assign date = publishedDate>
73
74<!-- variables para ShareThis SocialNetworks -->
75<#assign imageShareUrl = "" />
76<#assign videoShareUrl = "" />
77
78<div class="container noticia-contenido">
79
80 <div class="row">
81 <div class="col-12">
82 <div class="pb-3">
83 <span class="volver">
84 <img src="${themeImagesPath}/icons/icono_volver.svg" alt=""> <@liferay.language key="volver" />
85 </span>
86 </div>
87 <#assign urlPaginaCategoria = "">
88 <#if lang == "es_ES">
89 <#assign urlPaginaCategoria= "/cas/actualidad/-/categories/${categoryId}">
90 <#elseif lang == "ca_ES" >
91 <#assign urlPaginaCategoria= "/val/actualitat/-/categories/${categoryId}">
92 <#else>
93 <#assign urlPaginaCategoria = "/cas/actualidad">
94 </#if>
95 <ul class="listaCategoriasCabecera">
96 <li class="itemCategoria"><a class="enlaceCategoria" href="${urlPaginaCategoria}">${categoryName}</a></li>
97 </ul>
98 <h2 class="bloque_titulo">${Titular.getData()}</h2>
99 <h3 class="bloque_subtitulo">${Antetitulo.getData()}</h3>
100
101 <#assign cont=0 />
102 <#if tituloRecurso??>
103 <#list tituloRecurso.getSiblings() as cur_vImagen>
104 <#if cur_vImagen.tipoRecurso.getData() == "imagen" && cur_vImagen.multimedia.getData() != "">
105 <#assign cont = cont+1 />
106 </#if>
107 </#list>
108 </#if>
109 <#if enlaceYoutube?? && enlaceYoutube.getSiblings()?has_content>
110
111 <#list enlaceYoutube.getSiblings() as cur_enlaceYoutube>
112 <#if cur_enlaceYoutube.getData()?? && cur_enlaceYoutube.getData() != "">
113 <#assign url = cur_enlaceYoutube.getData()/>
114 <#assign url = url?replace("watch?v=","embed/")/>
115 <iframe id="player" class="div-you" src="${url}"allowfullscreen></iframe>
116 <#assign videoShareUrl = url />
117 <#if cur_enlaceYoutube.DescripcionYoutube?? && cur_enlaceYoutube.DescripcionYoutube.getData() != "">
118 <p>• ${cur_enlaceYoutube.DescripcionYoutube.getData()}</p>
119 </#if>
120
121 <#elseif tituloRecurso?? && tituloRecurso.getSiblings()?has_content>
122 <#if (cont > 1)>
123 <div class="div-img">
124 <ul class="ul-img" id="imgsSlider">
125 <#list tituloRecurso.getSiblings() as cur_vImagen>
126 <#if cur_vImagen.tipoRecurso.getData() == "imagen" && cur_vImagen.multimedia.getData() != "">
127 <li class="li-img">
128 <#assign imageJson = jsonFactoryUtil.createJSONObject(cur_vImagen.multimedia.data)>
129 <#assign imageClassPK = imageJson.getString("classPK")>
130 <@adaptive_media_image["img"] alt="" fileVersion=dlAppServiceUtil.getFileEntry(imageClassPK?number).getFileVersion()/>
131 <img class="slider-img" alt="" src="${cur_vImagen.multimedia.getData()}" />
132 <#assign imageShareUrl = themeDisplay.getPortalURL() + cur_vImagen.multimedia.getData() />
133
134 </li>
135
136 </#if>
137 </#list>
138 </ul>
139 </div>
140 </#if>
141 <#if (cont == 1)>
142 <#list tituloRecurso.getSiblings() as cur_vImagen>
143 <#if cur_vImagen.tipoRecurso.getData() == "imagen" && cur_vImagen.multimedia.getData() != "">
144 <#assign imageJson = jsonFactoryUtil.createJSONObject(cur_vImagen.multimedia.data)>
145 <#assign imageClassPK = imageJson.getString("classPK")>
146 <@adaptive_media_image["img"] alt="" fileVersion=dlAppServiceUtil.getFileEntry(imageClassPK?number).getFileVersion()/>
147 <img class="slider-img" alt="" src="${cur_vImagen.multimedia.getData()}" />
148 <p>• ${cur_vImagen.descripcionRecurso.getData()}</p>
149 <#assign imageShareUrl = themeDisplay.getPortalURL() + cur_vImagen.multimedia.getData() />
150 </#if>
151 </#list>
152 </#if>
153 </#if>
154 <#break>
155 </#list>
156
157 <#else>
158 <#if tituloRecurso?? && tituloRecurso.getSiblings()?has_content>
159 <#if (cont > 1)>
160 <div class="div-img">
161 <ul class="ul-img" id="imgsSlider">
162 <#list tituloRecurso.getSiblings() as cur_vImagen>
163 <#if cur_vImagen.tipoRecurso.getData() == "imagen" && cur_vImagen.multimedia.getData() != "">
164 <li class="li-img">
165 <#assign imageJson = jsonFactoryUtil.createJSONObject(cur_vImagen.multimedia.data)>
166 <#assign imageClassPK = imageJson.getString("classPK")>
167 <@adaptive_media_image["img"] alt="" fileVersion=dlAppServiceUtil.getFileEntry(imageClassPK?number).getFileVersion()/>
168 <img class="slider-img" alt="" src="${cur_vImagen.multimedia.getData()}" />
169
170 </li>
171
172 </#if>
173 </#list>
174 </ul>
175 </div>
176 </#if>
177 <#if (cont == 1)>
178 <#list tituloRecurso.getSiblings() as cur_vImagen>
179 <#if cur_vImagen.tipoRecurso.getData() == "imagen" && cur_vImagen.multimedia.getData() != "">
180 <#assign imageJson = jsonFactoryUtil.createJSONObject(cur_vImagen.multimedia.data)>
181 <#assign imageClassPK = imageJson.getString("classPK")>
182 <@adaptive_media_image["img"] alt="" fileVersion=dlAppServiceUtil.getFileEntry(imageClassPK?number).getFileVersion()/>
183 <img class="slider-img" alt="" src="${cur_vImagen.multimedia.getData()}" />
184 <p>• ${cur_vImagen.descripcionRecurso.getData()}</p>
185 <#assign imageShareUrl = themeDisplay.getPortalURL() + cur_vImagen.multimedia.getData() />
186 </#if>
187 </#list>
188 </#if>
189 </#if>
190
191 </#if>
192
193 <div class="dateRedes">
194 <!-- redes sociales -->
195
196 <nav id="compartir" class="compartir-redes-sociales text-right">
197 <ul>
198 <li class="whatsapp" data-lang="compartir_whatsapp">
199 <a id="enlace-whatsapp" class="social-icon" tabindex="1" href="" target="_blank" title="Compartir en Whatsapp"><img id="imagen-social-whatsapp" alt="Compartir en Whatsapp" src='${themeImagesPath}/social-media-icons/whatsapp-social-icon.png'></a>
200 </li>
201
202
203 <li class="twitter" data-lang="compartir_twitter">
204 <a id="enlace-twitter" class="social-icon" tabindex="1" href="" target="_blank" title="Compartir en Twitter"><img id="imagen-social-twitter" alt="Compartir en Twitter" src='${themeImagesPath}/social-media-icons/twitter-social-icon.png'></a>
205 </li>
206
207
208 <li class="facebook" data-lang="compartir_facebook">
209 <a id="enlace-facebook" class="social-icon" tabindex="1" href="" target="_blank" title="Compartir en Facebook"><img id="imagen-social-facebook" alt="Compartir en Facebook" src='${themeImagesPath}/social-media-icons/facebook-social-icon.png'></a>
210 </li>
211
212
213 <li class="mail" data-lang="compartir_email">
214 <a id="enlace-email" class="social-icon mr-0" tabindex="1" href="mailto:?Subject=${title}&Body=" title="Compartir por mail"><img id="imagen-social-email" alt="Compartir en mail" src='${themeImagesPath}/social-media-icons/email-social-icon.png'></a>
215 </li>
216
217 </ul>
218 </nav>
219 <p class="noticia-date">
220
221 <#assign fecha_Data = getterUtil.getString(fecha.getData())>
222 <#assign fechaInicio = "" />
223
224 <#if validator.isNotNull(fecha_Data)>
225
226 <#assign fecha_DateObj = dateUtil.parseDate("yyyy-MM-dd", fecha_Data, locale)>
227 <#assign fechaInicio = dateUtil.getDate(fecha_DateObj, "dd/MM/yyyy", locale, timeZone)?string />
228
229 <span class="fa fa-calendar"></span>${fechaInicio?has_content?then(fechaInicio,"")}
230
231
232 </#if>
233 </p>
234 </div>
235 <div>
236 ${Subtitulo.getData()}
237 </div>
238 <div>
239 ${descripcion.getData()}
240 </div>
241
242 <#assign article = JournalArticleLocalService.fetchArticle(getterUtil.getLong(scopeId), contentId)>
243
244
245 <!-- Título Recursos Multimedia -->
246 <#assign contitulo = "false">
247 <#if tituloRecurso?? && (tituloRecurso.getSiblings()?size>0)>
248
249 <#list tituloRecurso.getSiblings() as cur_Recurso>
250 <#if cur_Recurso?is_last && cur_Recurso.getData()?? && cur_Recurso.getData() != "" && cur_Recurso.tipoRecurso.getData() != "imagen" >
251 <div class="row">
252 <div class="col-xs-12 div-multimedia">
253 <h3><@liferay.language key="noticias.multimedia" /></h3>
254 </div>
255 </div>
256 <#assign contitulo = "true">
257 </#if>
258 </#list>
259
260 </#if>
261
262 <#if enlaceFlickr?has_content && enlaceFlickr.getData()?has_content>
263 <#if contitulo == "false">
264 <div class="row">
265 <div class="col-xs-12 div-multimedia">
266 <h3><@liferay.language key="noticias.multimedia" /></h3>
267 </div>
268 </div>
269 </#if>
270 <div class="container-flickr">
271 <#assign album = enlaceFlickr.getData()?substring(enlaceFlickr.getData()?last_index_of("/")+1)>
272 <iframe title="Flickr Album" class="iframe-flickr"
273 src="https://flickrembed.com/cms_embed.php?source=flickr&layout=responsive&input=${album}&sort=0&by=album&theme=default_notextpanel&scale=fit&speed=5000&limit=10&skin=default&autoplay=true"
274 scrolling="no" frameborder="0" allowFullScreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">
275 </iframe>
276 </div>
277 <a class="a-flickr" href="${enlaceFlickr.getData()}" target="_blank"><p><strong><@liferay.language key="noticias-imagenes-flickr"/></strong></p></a>
278 </#if>
279 </div>
280
281 </div>
282
283
284 <!--Carousel con videos e imágenes-->
285 <#assign continua = "false"/>
286 <#if enlaceYoutube?? && (enlaceYoutube.getSiblings()?size >= 1)>
287 <#list enlaceYoutube.getSiblings() as cur_enlaceYoutube>
288 <#if cur_enlaceYoutube?index == 0 && cur_enlaceYoutube.getData()?? && cur_enlaceYoutube.getData() != "">
289 <div class="row">
290 <div class="col-xs-12 div-multimedia">
291 <h3><@liferay.language key="noticias.galeria" /></h3>
292 </div>
293 </div>
294 <ul class="ul-imgVid" id="imgsVidsSlider">
295 <#assign continua = "true"/>
296 </#if>
297 <#if continua=="true">
298 <#if cur_enlaceYoutube?index != 0 && cur_enlaceYoutube.getData()?? && cur_enlaceYoutube.getData() != "">
299 <#assign urlVid = cur_enlaceYoutube.getData()/>
300 <#assign urlVid = urlVid?replace("watch?v=","embed/")/>
301 <li class="li-imgVid" href="${urlVid}" data-toggle="lightbox" data-gallery="mixedgallery" data-type="youtube">
302
303 <iframe class="slider-imgVid" src="${urlVid}"allowfullscreen></iframe>
304 </li>
305 </#if>
306 </#if>
307 </#list>
308 <#if continua=="true">
309 <#if (cont > 0)>
310 <#list tituloRecurso.getSiblings() as cur_vImagen>
311 <#if cur_vImagen.tipoRecurso.getData() == "imagen" && cur_vImagen.multimedia.getData() != "">
312 <li class="li-imgVid" href="${cur_vImagen.multimedia.getData()}" data-toggle="lightbox" data-gallery="mixedgallery" data-type="image">
313 <#assign imageJson = jsonFactoryUtil.createJSONObject(cur_vImagen.multimedia.data)>
314 <#assign imageClassPK = imageJson.getString("classPK")>
315 <@adaptive_media_image["img"] alt="" fileVersion=dlAppServiceUtil.getFileEntry(imageClassPK?number).getFileVersion()/>
316 <img class="slider-imgVid" alt="" src="${cur_vImagen.multimedia.getData()}" />
317 </li>
318 </#if>
319 </#list>
320 </#if>
321 </#if>
322 </ul>
323 </#if>
324
325
326 <!--Recursos Multimedia-->
327 <#if tituloRecurso?? && (tituloRecurso.getSiblings()?size>0)>
328
329 <#list tituloRecurso.getSiblings() as cur_RecursoLista>
330 <#assign contiene = "false" />
331 <#if cur_RecursoLista.tipoRecurso.getData() != "imagen">
332 <#if cur_RecursoLista.getData()?? && cur_RecursoLista.getData() != "">
333 <#assign titulo = cur_RecursoLista.getData()/>
334 <#assign contiene = "true" />
335 </#if>
336 <#if contiene == "true">
337 <#if cur_RecursoLista.tipoRecurso.getData()?? && cur_RecursoLista.tipoRecurso.getData() != "">
338 <#if cur_RecursoLista.tipoRecurso.getData()?? && cur_RecursoLista.tipoRecurso.getData() == "audio">
339 <#assign icono = "audio" />
340 <#elseif cur_RecursoLista.tipoRecurso.getData()?? && cur_RecursoLista.tipoRecurso.getData() == "imagen">
341 <#assign icono = "imagen" />
342 <#elseif cur_RecursoLista.tipoRecurso.getData()?? && cur_RecursoLista.tipoRecurso.getData() == "documento">
343 <#assign icono = "documento" />
344 <#elseif cur_RecursoLista.tipoRecurso.getData()?? && cur_RecursoLista.tipoRecurso.getData() == "video">
345 <#assign icono = "video" />
346 <#else>
347 <#assign icono = "" />
348 </#if>
349 </#if>
350 <#if cur_RecursoLista.enlaceRecurso?? && cur_RecursoLista.enlaceRecurso.getData()?? && cur_RecursoLista.enlaceRecurso.getData() != "">
351 <#assign enlace = cur_RecursoLista.enlaceRecurso.getData() />
352 <#else>
353 <#assign enlace = "#"/>
354 </#if>
355 </#if>
356 <#if titulo?? && titulo != "">
357
358 <div class="row col-xl-4 col-lg-4 col-md-6" style="position: relative; float: left;">
359 <div class="col-xs-12 contenido-multimedia mb-4">
360
361 <#if browserSniffer.isIe(httpServletRequest)>
362 <img class="icono-multimedia" src="${themeImagesPath}/noticias-icons/${icono}-icon.png"/><a href="${cur_RecursoLista.multimedia.getData()}" title="${titulo}" target="_blank">${titulo}</a>
363 <#else>
364
365 <#if icono == "audio">
366 <audio src="${cur_RecursoLista.multimedia.getData()}" preload="auto" controls>
367 <img class="icono-multimedia" src="${themeImagesPath}/noticias-icons/${icono}-icon.png"/><a href="${cur_RecursoLista.multimedia.getData()}" title="${titulo}" target="_blank">${titulo}</a>
368 </audio>
369 <div class="row align-items-center ml-3" >
370 <span>${titulo}</span>
371 </div>
372
373 <#elseif icono == "video">
374 <video width="360" height="200" src="${cur_RecursoLista.multimedia.getData()}?version=1.0&videoPreview=1&type=mp4" preload="auto" controls></video>
375 <div class="row align-items-center ml-2" >
376 <a href="${cur_RecursoLista.multimedia.getData()}?version=1.0&videoPreview=1&type=mp4" title="${titulo}" target="_blank">${titulo}</a>
377 </div>
378 <#else>
379 <img class="icono-multimedia" src="${themeImagesPath}/noticias-icons/${icono}-icon.png"/><a href="${cur_RecursoLista.multimedia.getData()}" title="${titulo}" target="_blank">${titulo}</a>
380 </#if>
381
382 </#if>
383
384
385 </div>
386 </div>
387
388 </#if>
389 </#if>
390 </#list>
391 </#if>
392
393
394
395 <!-- buscamos contenidos relacionados -->
396 <div class = "noticia-contenido-related-content">
397
398 <#assign articleEntry = AssetEntryLocalService.getEntry(journalArticleClassname, article.getResourcePrimKey())>
399 <#assign groupIdEntry = articleEntry.getGroupId()>
400
401 <#assign relatedEntries = AssetLinkLocalService.getDirectLinks(articleEntry.getEntryId()) >
402 <#assign listCategory = assetCategoryService.getAssetEntryAssetCategories(articleEntry.getEntryId()) >
403
404 <#assign noticiasRel = []/>
405 <#if relatedEntries?has_content>
406 <#assign ddmKeyNoticia = "156671" >
407 <#list relatedEntries as relatedAsset>
408 <#assign relatedEntry = AssetEntryLocalService.getEntry(relatedAsset.getEntryId2()) >
409 <#assign entryClassPK = relatedEntry.getClassPK() >
410
411 <#assign journalArticleClassname = "com.liferay.journal.model.JournalArticle" >
412 <#if journalArticleClassname==relatedEntry.getClassName() >
413 <#assign relatedArticle = JournalArticleLocalService.fetchLatestArticle(entryClassPK) >
414 </#if>
415 <#if relatedArticle.getDDMStructureKey() == ddmKeyNoticia >
416 <#assign noticiasRel = noticiasRel + [relatedArticle] />
417 </#if>
418 </#list>
419 <#if (noticiasRel?size>0)>
420 <div class="row" style="background: linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,.8)), url(/o/valencia-theme/css/img/puente-las-flores_RECT.JPG); background-size: cover; background-position: center;">
421 <div class="col-xs-12">
422 <div class="row">
423 <div class="col-xs-12">
424 <h3><@liferay.language key="noticias.relacionadas" /></h3>
425 </div>
426 </div>
427 <div class="row">
428 <div class="col-xs-12">
429 <#assign contNoticias = 0 />
430
431 <ul id="categorySlider">
432 <#list noticiasRel as noticiaRel>
433
434 <#assign imagen = "${themeImagesPath}/imagen_no_disponible.jpg">
435
436 <#assign rootElement = saxReaderUtil.read(noticiaRel.getContentByLocale(locale)).getRootElement() />
437 <#assign selectorTipo = saxReaderUtil.createXPath("dynamic-element[@name='tituloRecurso']/dynamic-element[@name='tipoRecurso']") />
438
439 <#assign selector = saxReaderUtil.createXPath("dynamic-element[@name='tituloRecurso']/dynamic-element[@name='multimedia']") />
440 <#assign document = saxReaderUtil.read(relatedArticle.getContentByLocale(locale))>
441
442
443 <#if selectorTipo.selectSingleNode(rootElement)?has_content>
444 <#assign tipo = selectorTipo.selectSingleNode(rootElement).getStringValue()?replace("\"", "") />
445 </#if>
446 <#if (tipo?? && tipo?trim == "imagen") && selector.selectSingleNode(rootElement)?has_content>
447 <#assign jsonObjectString = document.valueOf("//dynamic-element[@name='multimedia']/dynamic-content/text()") />
448 <#if jsonObjectString?has_content>
449 <#assign jsonObject = jsonObjectString?eval>
450 <#assign entryUuid = jsonObject.uuid />
451 <#assign entryGroupId = getterUtil.getLong(jsonObject.groupId) />
452 <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid, entryGroupId) />
453 <#assign assetEntry = AssetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry",dlFileEntry.fileEntryId) />
454 <#assign assetRenderer = assetEntry.assetRenderer />
455 <#assign imagen = assetRenderer.getURLDownload(themeDisplay) />
456
457 <#assign imagen2 = noticiasRel[contNoticias] />
458
459 <#assign document2 = saxReaderUtil.read(imagen2.getContentByLocale(locale))>
460 <#assign jsonObjectString2 = document2.valueOf("//dynamic-element[@name='multimedia']/dynamic-content/text()") />
461 <#assign jsonObject2 = jsonObjectString2?eval>
462 <#assign entryUuid2 = jsonObject2.uuid />
463 <#assign entryGroupId2 = getterUtil.getLong(jsonObject2.groupId) />
464 <#assign dlFileEntry2 = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid2, entryGroupId2) />
465 <#assign assetEntry = AssetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry",dlFileEntry2.fileEntryId) />
466 <#assign assetRenderer = assetEntry.assetRenderer />
467 <#assign imagen3 = assetRenderer.getURLDownload(themeDisplay) />
468
469
470
471 </#if>
472 </#if>
473
474 <#assign selectorTitular = saxReaderUtil.createXPath("dynamic-element[@name='Titular']") />
475 <#if selectorTitular.selectSingleNode(rootElement)?has_content>
476 <#assign titularRelacionada = selectorTitular.selectSingleNode(rootElement).getStringValue()?replace("\"", "") />
477 </#if>
478
479
480 <li class="li-slider">
481 <a class="a-related" href="/-/${noticiaRel.getUrlTitle()}">
482 <div class="div-related" style="min-height:200px;max-height:300px;">
483 <img src="${imagen3}" alt="" style="width: 260px; height: 200px;">
484 </div>
485 <span>${titularRelacionada}</span>
486 </a>
487 </li>
488 <#assign contNoticias = contNoticias + 1 />
489 <#if (contNoticias == 8) >
490 <#break>
491 </#if>
492
493 </#list>
494 </ul>
495 </div>
496 </div>
497
498 </div>
499 </div>
500 </#if> <#-- if (noticiasRel?size>0) -->
501 </#if> <#-- relatedEntries?has_content -->
502
503 <#if listCategory[0].getCategoryId()?? && !relatedEntries?has_content>
504 <#assign entries = commonUtilsApi.findRelatedContentByStructure(themeDisplay.getCompanyId(),themeDisplay.getUserId(),themeDisplay.getScopeGroupId(),categoryId,"${journalArticle.getDDMStructureKey()}",0,8)/>
505
506 <#if entries?has_content>
507 <div id="relatedByCategory" class="row" style=" background-color: #e0e0e0;">
508 <div class="col-xs-12">
509 <div class="row">
510 <div class="col-xs-12">
511 <h3><@liferay.language key="noticias.relacionadas" /></h3>
512 </div>
513 </div>
514 <div class="row">
515 <div class="col-xs-12">
516
517 <ul id="categorySlider">
518 <#list entries as noticiaAsset>
519
520
521 <#assign noticiaRel = journalArticleLocalService.fetchLatestArticle(getterUtil.getLong(noticiaAsset.getField("entryClassPK").getValue())) />
522 <#assign imagen = "${themeImagesPath}/imagen_no_disponible.jpg">
523
524 <#assign rootElement = saxReaderUtil.read(noticiaRel.getContentByLocale(locale)).getRootElement() />
525 <#assign selectorTipo = saxReaderUtil.createXPath("dynamic-element[@name='tituloRecurso']/dynamic-element[@name='tipoRecurso']") />
526
527 <#assign selector = saxReaderUtil.createXPath("dynamic-element[@name='tituloRecurso']/dynamic-element[@name='multimedia']") />
528 <#assign document = saxReaderUtil.read(noticiaRel.getContentByLocale(locale))>
529
530
531 <#if selectorTipo.selectSingleNode(rootElement)?has_content>
532 <#assign tipo = selectorTipo.selectSingleNode(rootElement).getStringValue()?replace("\"", "") />
533 </#if>
534 <#if (tipo?? && tipo?trim == "imagen") && selector.selectSingleNode(rootElement)?has_content>
535 <#assign jsonObjectString = document.valueOf("//dynamic-element[@name='multimedia']/dynamic-content/text()") />
536 <#if jsonObjectString?has_content >
537 <#assign jsonObject = jsonObjectString?eval>
538 <#assign entryUuid = jsonObject.uuid />
539 <#assign entryGroupId = getterUtil.getLong(jsonObject.groupId) />
540 <#attempt>
541 <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid, entryGroupId) />
542 <#recover>
543 <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId("f210c305-77c0-5891-b21c-439ff1267042", 20142) />
544 </#attempt>
545 <#assign assetEntry = AssetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry",dlFileEntry.fileEntryId) />
546 <#assign assetRenderer = assetEntry.assetRenderer />
547 <#assign imagen = assetRenderer.getURLDownload(themeDisplay) />
548
549 </#if>
550 </#if>
551
552 <#assign selectorTitular = saxReaderUtil.createXPath("dynamic-element[@name='Titular']") />
553 <#if selectorTitular.selectSingleNode(rootElement)?has_content>
554 <#assign titularRelacionada = selectorTitular.selectSingleNode(rootElement).getStringValue()?replace("\"", "") />
555 </#if>
556 <#if "/-/"+noticiaRel.getUrlTitle() != themeDisplay.getURLCurrent()>
557 <li>
558 <#if lang == "es_ES">
559 <#assign urlTitularRel = "/cas/actualidad/-/content/${noticiaRel.getUrlTitle()}"/>
560 <a class="a-related" href="${urlTitularRel}">
561 <div class="div-related" style="min-height:200px;max-height:300px;">
562 <img src="${imagen}" alt="" style="width: 100%;">
563 </div>
564 <span>${titularRelacionada}</span>
565 </a>
566 <#elseif lang == "ca_ES" >
567 <#assign urlTitularRel = "/val/actualitat/-/content/${noticiaRel.getUrlTitle()}"/>
568 <a class="a-related" href="${urlTitularRel}">
569 <div class="div-related" style="min-height:200px;max-height:300px;">
570 <img src="${imagen}" alt="" style="width: 100%;">
571 </div>
572 <span>${titularRelacionada}</span>
573 </a>
574 <#else>
575 <#assign urlTitularRel = "/val/actualitat/-/content/${noticiaRel.getUrlTitle()}"/>
576 <a class="a-related" href="${urlTitularRel}">
577 <div class="div-related" style="min-height:200px;max-height:300px;">
578 <img src="${imagen}" alt="" style="width: 100%;">
579 </div>
580 <span>${titularRelacionada}</span>
581 </a>
582 </#if>
583 </li>
584 </#if>
585
586 </#list>
587 </ul>
588
589 </div>
590 </div>
591
592 </div>
593 </div>
594 </#if> <#-- if entries?has_content -->
595 </#if> <#-- if listCategory[0].getCategoryId()?? && !relatedEntries?has_content -->
596
597 </div> <!-- class = "noticia-contenido-related-content" -->
598
599
600</div> <!-- class="container noticia-contenido" -->
601
602
603<@liferay_portlet["runtime"] portletName="socialnetwork_share_Actualidad_SocialnetworkSharePortlet" />
604
605<script type="text/javascript">
606
607$(document).ready(function() {
608 var backUrl = "${backUrl}";
609 var titularSanitized = encodeURIComponent('${Titular.getData()?js_string}');
610
611 // Modificamos los enlaces de los social media buttons
612 var urlNoticiaActual = "${urlArticleNoContext}";
613
614 var enlaceWhatsapp = document.getElementById("enlace-whatsapp");
615 var cadenaWhatsapp = "whatsapp://send?text=";
616 enlaceWhatsapp.setAttribute("href", cadenaWhatsapp.concat(urlNoticiaActual));
617
618 var enlaceTwitter = document.getElementById("enlace-twitter");
619 var cadenaTwitter = "https://twitter.com/intent/tweet?original_referer=";
620 cadenaTwitter = cadenaTwitter.concat(urlNoticiaActual);
621 cadenaTwitter = cadenaTwitter.concat("&text=").concat(titularSanitized).concat(" ").concat(urlNoticiaActual);
622 cadenaTwitter = cadenaTwitter.concat("&via=AjuntamentVLC");
623 enlaceTwitter.setAttribute("href", cadenaTwitter);
624
625 var enlaceFacebook = document.getElementById("enlace-facebook");
626 var cadenaFacebook = "http://www.facebook.com/sharer/sharer.php?u=";
627 enlaceFacebook.setAttribute("href", cadenaFacebook.concat(urlNoticiaActual));
628
629 var enlaceEmail = document.getElementById("enlace-email");
630 var cadenaEmail = enlaceEmail.getAttribute("href");
631 enlaceEmail.setAttribute("href", cadenaEmail.concat(urlNoticiaActual));
632
633 var imgsSlider = $("#imgsSlider").lightSlider({
634 item:1,
635 autoWidth: false,
636 mode: "slide",
637 slideMove: 1,
638 speed: 2000, //ms'
639 auto: true,
640 loop: true,
641 slideEndAnimation: true,
642 pause: 5000,
643
644 keyPress: false,
645 controls: true,
646 prevHtml: '<i class="fa fa-chevron-left"> </i>',
647 nextHtml: '<i class="fa fa-chevron-right"> </i>',
648 vertical:false,
649
650 thumbItem:10,
651 pager: false,
652 gallery: false,
653 currentPagerPosition: 'middle',
654
655 enableTouch:true,
656 enableDrag:true,
657 freeMove:true,
658 swipeThreshold: 40,
659 responsive : [{
660 breakpoint:1200,
661 settings: {
662 item:1,
663 }
664 },
665 {
666 breakpoint:800,
667 settings: {
668 item:1,
669 slideMove: 1,
670 }
671 },
672 {
673 breakpoint:480,
674 settings: {
675 item:1,
676 slideMove: 1,
677 }
678 }],
679
680 onBeforeStart: function (el) {},
681 onSliderLoad: function (el) {},
682 onBeforeSlide: function (el) {},
683 onAfterSlide: function (el) {},
684 onBeforeNextSlide: function (el) {},
685 onBeforePrevSlide: function (el) {}
686
687 });
688 var sliderImgVid = $("#imgsVidsSlider").lightSlider({
689 item:4,
690 autoWidth: false,
691 mode: "slide",
692 slideMove: 2,
693 speed: 500, //ms'
694 auto: true,
695 loop: true,
696 slideEndAnimation: true,
697 pause: 2000,
698
699 keyPress: false,
700 controls: true,
701 prevHtml: '<i class="fa fa-chevron-left"> </i>',
702 nextHtml: '<i class="fa fa-chevron-right"> </i>',
703 vertical:false,
704
705 thumbItem:10,
706 pager: true,
707 gallery: false,
708 currentPagerPosition: 'middle',
709
710 enableTouch:true,
711 enableDrag:true,
712 freeMove:true,
713 swipeThreshold: 40,
714 responsive : [{
715 breakpoint:1200,
716 settings: {
717 item:4,
718 }
719 },
720 {
721 breakpoint:800,
722 settings: {
723 item:3,
724 slideMove: 1,
725 }
726 },
727 {
728 breakpoint:480,
729 settings: {
730 item:1,
731 slideMove: 1,
732 }
733 }],
734
735 onBeforeStart: function (el) {},
736 onSliderLoad: function (el) {},
737 onBeforeSlide: function (el) {},
738 onAfterSlide: function (el) {},
739 onBeforeNextSlide: function (el) {},
740 onBeforePrevSlide: function (el) {}
741
742 });
743 var slider = $("#categorySlider").lightSlider({
744 item:4,
745 autoWidth: false,
746 mode: "slide",
747 slideMove: 1,
748 speed: 2000, //ms'
749 auto: true,
750 loop: true,
751 slideEndAnimation: false,
752 pause: 6000,
753
754 keyPress: true,
755 controls: true,
756 prevHtml: '<i class="fa fa-chevron-left"> </i>',
757 nextHtml: '<i class="fa fa-chevron-right"> </i>',
758 vertical:false,
759
760 thumbItem:10,
761 pager: true,
762 gallery: false,
763 currentPagerPosition: 'middle',
764
765 enableTouch:true,
766 enableDrag:true,
767 freeMove:true,
768 swipeThreshold: 40,
769 responsive : [{
770 breakpoint:1200,
771 settings: {
772 item:3,
773 }
774 },
775 {
776 breakpoint:990,
777 settings: {
778 item:2,
779 slideMove: 1,
780 }
781 },
782 {
783 breakpoint:768,
784 settings: {
785 item:1,
786 slideMove: 1,
787 }
788 }],
789
790 onBeforeStart: function (el) {},
791 onSliderLoad: function (el) {},
792 onBeforeSlide: function (el) {},
793 onAfterSlide: function (el) {},
794 onBeforeNextSlide: function (el) {},
795 onBeforePrevSlide: function (el) {}
796
797 });
798
799 // añade play/pause a botones inferiores del carrusel
800 $('.lSPager').wrap('<div class="slider-dots-wrapper"></div>');
801 $('.slider-dots-wrapper').prepend('<span class="btn-play glyphicon">');
802 $('.btn-play').on('click', function () {
803 if ($('.btn-play').hasClass('btn-play-paused') ) {
804 slider.play();
805 } else {
806 slider.pause();
807 }
808 $('.btn-play').toggleClass('btn-play-paused');
809 });
810
811 jQuery.urlParam = function(name){
812 var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
813 return results?results[1]:0;
814 }
815
816 var redirectParam = jQuery.urlParam("redirect");
817 $(".volver").on("click", function(){
818 if(redirectParam !== 0){
819 window.location.href = decodeURIComponent(redirectParam);
820 }else if(backUrl != ""){
821 window.location.href = backUrl;
822 }else{
823 history.go(-1);
824 }
825 });
826
827 $('.div-multimedia').click(function(){
828 $('.contenido-multimedia').toggle();
829 });
830
831 $('.lexicon-icon-share-alt').replaceWith('<img class="img-compartir" src="${themeImagesPath}/icons/icono_compartir.svg">')
832 var shareButtons = $('.pull-right');
833 $('.div-share').append(shareButtons);
834
835 $('.clone').css("text-align","left");
836
837});
838
839 $(document).on('click', '[data-toggle="lightbox"]', function(event) {
840 event.preventDefault();
841 $(this).ekkoLightbox({
842 alwaysShowClose:true
843 });
844 });
845
846 // modifica title en head del html
847 document.title = '${Titular.getData()?js_string}';
848
849 function showpics()
850 {var a=$("#box").val();$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags="+a+"&tagmode=any&format=json&jsoncallback=?",function(a)
851 {$("#images").hide().html(a).fadeIn("fast"),$.each(a.items,function(a,e){$("<img/>").attr("src",e.media.m).appendTo("#images")})})}
852</script>
853<style>
854 .noticia-contenido-related-content {
855 font-size: 0.9em;
856 clear: both;
857 }
858 .fa {
859 margin-right: 0.7em;
860 }
861 .noticia-date {
862 padding-top: 15px !important;
863 }
864 .compartir-redes-sociales ul {
865 background-color: transparent;
866 }
867 #compartir {
868 width: 50 !important;
869 float: right !important;
870 }
871 .dateRedes {
872 margin-bottom: 3%;
873 }
874 .listaCategoriasCabecera {
875 display: flex;
876 margin-top: 10px;
877 margin-bottom: 10px;
878 list-style: none;
879 }
880 .itemCategoria::before {
881 content: "\2022";
882 color: #ffcd00;
883 font-size: 90px;
884 line-height: 0;
885 }
886 .enlaceCategoria {
887 display: block;
888 margin-top: -41px;
889 padding-left: 30px;
890 }
891
892 .lSSlideOuter .lSPager.lSpg>li.active a, .lSSlideOuter .lSPager.lSpg>li:hover a {
893 background-color: #ffcd00;
894 }
895 .btn-default {
896 background-color: black;
897 }
898
899 .noticia-contenido .slider-img {
900 max-height: 38em !important;
901 height: auto;
902 }
903
904 .container-flickr {
905 height: 520px;
906 width: 100%;
907 padding: 0;
908 margin: 0;
909 }
910
911 .iframe-flickr {
912 width:100%;
913 height:100%;
914 }
915
916 .a-flickr {
917 text-align:center;
918 margin-top:1em;
919 }
920
921 #relatedByCategory h3 {
922 margin-top: 0.5rem;
923 }
924 #relatedByCategory .lslide .a-related span,
925 #relatedByCategory .clone .a-related span {
926 font-family:Montserrat-SemiBold;
927 display: block;
928 margin-top: 5px;
929 }
930
931 .slider-dots-wrapper {
932 text-align: center;
933 }
934 .noticia-contenido-related-content .btn-play {
935 color: #222;
936 display: inline-block;
937 font-size: 13px;
938 }
939 .noticia-contenido-related-content .btn-play:hover {
940 cursor: pointer;
941 }
942 .noticia-contenido-related-content .btn-play:before {
943 content: "\e073";
944 }
945 .noticia-contenido-related-content .btn-play-paused:before {
946 content: "\e072";
947 }
948 .lSSlideOuter .lSPager.lSpg {
949 display: inline-block;
950 }
951 .lSSlideOuter .lSPager.lSpg>li a {
952 width: 10px;
953 height: 10px;
954 }
955 picture {
956 display:none;
957 }
958
959
960</style>