An error occurred while processing the template.
Failed to "?eval" string with this error:
---begin-message---
Syntax error in ?eval-ed string in line 1, column 65:
Lexical error: encountered "u" (117), after "\"Promotional image of L\u00ednea Directa\\".
---end-message---
The failing expression:
==> imagenWC?eval [in template "20357736420605#1710429#1943163" at line 17, column 45]
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign imagenWCJson = imagenWC?eval [in template "20357736420605#1710429#1943163" at line 17, column 21]
----
1<#assign dlService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
2
3<#if entries?has_content>
4 <div class="noticias home">
5 <h2 class="d-flex h2 justify-content-center"><span><@liferay.language key="last_news" /></span></h2>
6 <div class="row listado-noticias">
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 imagenWCJson = imagenWC?eval>
18 <#assign imagen = "">
19 <#if imagenWC?? && imagenWC != "">
20 <#assign fileEntry = dlService.getFileEntryByUuidAndGroupId(imagenWCJson.uuid, groupId)>
21 <#assign imagen = "/documents/"+fileEntry.getRepositoryId()+"/"+ fileEntry.getFolderId()+"/"+fileEntry.getFileName()+"/"+fileEntry.getUuid()/>
22 </#if>
23 <#assign alt = imagenWCJson.alt >
24 <#-- UrlLink -->
25 <#assign urllink = getField("urllink", locale, defaultLanguageId, rootElement)>
26 <#assign urlText = getField("textoUrl", locale, defaultLanguageId, rootElement)>
27 <#-- Pagina Destino -->
28 <#assign enlace = getField("enlace", locale, defaultLanguageId, rootElement)>
29 <#assign enlaceText = getField("textoLink", locale, defaultLanguageId, rootElement)>
30
31 <#-- Detalle -->
32 <#assign pagDetalle = "/sala-de-prensa/-/" + journalArticle.getUrlTitle()>
33 <#assign masNoticias = "/sala-de-prensa/notas-de-prensa">
34 <#assign target = "_self">
35 <#assign title = "">
36
37 <#if urllink?has_content && urllink != "" && urllink != "{}">
38 <#assign pagDetalle = urllink>
39 <#assign target = "_blank">
40 <#assign title = urlText>
41 <#elseif enlace?has_content && enlace != "" && enlace != "{}">
42 <#assign issueUrl_Array = enlace?split("@")>
43 <#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
44 <#assign val = 0>
45 <#assign group = issueUrl_Array[2]?number>
46 <#assign layout = issueUrl_Array[0]?number>
47 <#assign pageLayout = layoutLocalService.getLayout(group, false, layout) >
48 <#assign pagDetalle = pageLayout.getFriendlyURL()>
49 <#assign title = enlaceText>
50 </#if>
51
52 <#if entry?index==0 >
53 <div class="col-lg-7 pl-lg-0">
54 <div class="item destacada">
55 <#elseif entry?index==1>
56 <div class="col-lg-5">
57 <div class="item">
58 <#else>
59 <div class="item">
60 </#if>
61 <a class="link" href="${pagDetalle}" target="${target}" title="${title}">
62 <div class="imagen"> <img src="${imagen}" alt="${alt}"/></div>
63 <div class="texto">
64 <div class="titulo">${titulo}</div>
65 <p class="leer-mas"> <@liferay.language key="read-more" /> <span class="flecha">→</span> </p>
66 </div>
67 </a>
68
69 <#if entry?index==0 >
70 </div>
71 </div>
72
73 <#elseif entry?index==1>
74 </div>
75 <#else>
76 </div>
77 </div>
78 </#if>
79
80 </#list>
81 </div>
82
83 <div class="ver-mas-noticias"><a href="${masNoticias}" target="${target}"><span><@liferay.language key="view.more_news" /></span><span class="flecha">→</span></a></div>
84
85 </div>
86</#if>
87
88
89
90
91
92
93<#function getField field languageId defaultLanguageId xml>
94 <#local defaultSelector = "//dynamic-content[@language-id='" + defaultLanguageId + "' and ancestor-or-self::*[@name='" + field + "']]">
95 <#local localeSelector = "//dynamic-content[@language-id='" + languageId + "' and parent::*[@name='" + field + "']]">
96
97 <#local selector = saxReaderUtil.createXPath(localeSelector)>
98 <#local value = selector.selectSingleNode(xml)!>
99
100 <#if value?has_content>
101 <#return value.getText()>
102 </#if>
103
104 <#local selector = saxReaderUtil.createXPath(defaultSelector)>
105 <#local value = selector.selectSingleNode(xml)!>
106
107 <#if value?has_content>
108 <#return value.getText()>
109 </#if>
110
111 <#return "">
112</#function>
113
114<#function parseXml xpath xml>
115 <#local selector = saxReaderUtil.createXPath(xpath)>
116 <#local result = selector.selectSingleNode(xml)!>
117
118 <#if result?has_content>
119 <#return result.getStringValue()>
120 </#if>
121
122 <#return "">
123</#function>
