Se ha producido un error al procesar la plantilla.
Failed to "?eval" string with this error: ---begin-message--- Syntax error in ?eval-ed string in line 1, column 251: Lexical error: encountered "u" (117), after "\"Seg\u00fan datos oficiales, en Espa\u00f1a\u00a0hay 2,65 millones de veh\u00edculos sin seguro. Esta cifra supone que casi el 8% del parque automovil\u00edstico\u00a0espa\u00f1ol est\u00e1 compuesto por \\". ---end-message--- The failing expression: ==> imagenWC?eval [in template "10512#10549#665073" at line 20, column 45] ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign imagenWCJson = imagenWC?eval [in template "10512#10549#665073" at line 20, column 21] ----
1<#assign dlService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
2
3<#if entries?has_content>
4
5 <div class="ofertas-de-empleo bloques-cajas-sombreadas">
6 <div class="row">
7 <#list entries as entry>
8 <#assign assetRenderer = entry.getAssetRenderer()/>
9 <#assign journalArticle = assetRenderer.getAssetObject() />
10 <#assign document = saxReaderUtil.read(journalArticle.getContent())>
11 <#assign rootElement = document.getRootElement()>
12 <#assign defaultLanguageId = parseXml ("@default-locale", rootElement)>
13 <#-- Titulo -->
14 <#assign titulo = getField("titulo", locale, defaultLanguageId, rootElement)>
15 <#-- Imagen -->
16 <#assign imagenWC = getField("imagen", locale, defaultLanguageId, rootElement)>
17 <#assign imagen = "">
18 <#assign alt = "">
19 <#if imagenWC?? && imagenWC != "">
20 <#assign imagenWCJson = imagenWC?eval>
21 <#assign fileEntry = dlService.getFileEntryByUuidAndGroupId(imagenWCJson.uuid, groupId)>
22 <#assign imagen = "/documents/"+fileEntry.getRepositoryId()+"/"+ fileEntry.getFolderId()+"/"+fileEntry.getFileName()+"/"+fileEntry.getUuid()/>
23 <#assign alt = imagenWCJson.alt >
24 </#if>
25 <#-- UrlLink -->
26 <#assign urllink = getField("urllink", locale, defaultLanguageId, rootElement)>
27 <#assign urlText = getField("textoUrl", locale, defaultLanguageId, rootElement)>
28 <#-- Pagina Destino -->
29 <#assign enlace = getField("enlace", locale, defaultLanguageId, rootElement)>
30 <#assign enlaceText = getField("textoLink", locale, defaultLanguageId, rootElement)>
31 <#-- Detalle -->
32 <#assign pagDetalle = "/sala-de-prensa/-/" + journalArticle.getUrlTitle()>
33 <#assign target = "_self">
34 <#assign title = "">
35
36 <#if urllink?? && urllink != "">
37 <#assign pagDetalle = urllink>
38 <#assign target = "_blank">
39 <#assign title = urlText>
40 <#elseif enlace?? && enlace != "">
41 <#assign issueUrl_Array = enlace?split("@")>
42 <#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
43 <#assign val = 0>
44 <#assign group = issueUrl_Array[2]?number>
45 <#assign layout = issueUrl_Array[0]?number>
46 <#assign pageLayout = layoutLocalService.getLayout(group, false, layout) >
47 <#assign pagDetalle = pageLayout.getFriendlyURL()>
48 <#assign title = enlaceText>
49 </#if>
50 <#-- Fecha -->
51 <#assign fecha = getField("fecha", locale, defaultLanguageId, rootElement)>
52 <#-- Ciudad -->
53 <#assign ciudad = getField("ciudad", locale, defaultLanguageId, rootElement)>
54 <#-- Descripcion -->
55 <#assign descripcion = getField("descripcion", locale, defaultLanguageId, rootElement)>
56
57 <#assign entriesSize = (entries?size / 2)?int >
58
59 <#if entry?is_first || entry?index == entriesSize>
60 </#if>
61 <div class="col-md-6">
62 <div class="row">
63 <div class="col-md-12">
64 <div class="caja">
65 <p class="epigrafe">${fecha}</p>
66 <div class="titulo">${titulo}</div>
67 <div class="subtitulo destacado">${ciudad}</div>
68 <div class="descripcion text-left">${descripcion}</div>
69 <div class="ir-flecha text-left"><a href="${pagDetalle}" target="${target}" title="${title}"><@liferay.language key="read-more" /><span class="flecha">→</span></a></div>
70 </div>
71 </div>
72 <#if entry?is_last || entry?index == entriesSize - 1 >
73 </#if>
74 </div>
75 </div>
76
77 </#list>
78 </div>
79 </div>
80</#if>
81
82<#function getField field languageId defaultLanguageId xml>
83 <#local defaultSelector = "//dynamic-content[@language-id='" + defaultLanguageId + "' and ancestor-or-self::*[@name='" + field + "']]">
84 <#local localeSelector = "//dynamic-content[@language-id='" + languageId + "' and parent::*[@name='" + field + "']]">
85
86 <#local selector = saxReaderUtil.createXPath(localeSelector)>
87 <#local value = selector.selectSingleNode(xml)!>
88
89 <#if value?has_content>
90 <#return value.getText()>
91 </#if>
92
93 <#local selector = saxReaderUtil.createXPath(defaultSelector)>
94 <#local value = selector.selectSingleNode(xml)!>
95
96 <#if value?has_content>
97 <#return value.getText()>
98 </#if>
99
100 <#return "">
101</#function>
102
103<#function parseXml xpath xml>
104 <#local selector = saxReaderUtil.createXPath(xpath)>
105 <#local result = selector.selectSingleNode(xml)!>
106
107 <#if result?has_content>
108 <#return result.getStringValue()>
109 </#if>
110
111 <#return "">
112</#function>
113
114<script>
115
116 $( document ).ready(function() {
117 var maxHeight = 0;
118 $.each($('.caja'), function (key, value) {
119 if ($(this).height() > maxHeight) {
120 maxHeight = $(this).height();
121 }
122 ;
123 });
124 console.log(maxHeight);
125 $('.caja').height(maxHeight);
126 });
127</script>