Publicaciones

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 90:
Lexical error: encountered "u" (117), after "\"Portada Esc\u00e9nica Po\u00e9tica I. El jard\u00edn de los infantes locos\\".
---end-message---

The failing expression:
==> imgGS?eval  [in template "20096#20122#8960590" at line 137, column 46]

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign imgUuidGS = imgGS?eval.uuid!""  [in template "20096#20122#8960590" at line 137, column 25]
----
1<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
2<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
3<#assign journalArticleResourceLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService") /> 
4<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
5<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
6<#assign jsonFactory = serviceLocator.findService("com.liferay.portal.kernel.json.JSONFactory") /> 
7 
8<style> 
9.cont-mediateca .card-reco-img-container img { 
10    height: 100%; 
11}	 
12.lfr-pagination, .taglib-categorization-filter { 
13  max-width: 1260px; 
14  margin: 1.5rem auto; 
15  align-items: center; 
16	display: flex; 
17	padding: 0 1rem; 
18
19@media (min-width: 576px) { 
20	.lfr-pagination, .taglib-categorization-filter { 
21		max-width: 540px; 
22		padding: 0; 
23
24
25@media (min-width: 768px) { 
26	.lfr-pagination, .taglib-categorization-filter { 
27		max-width: 720px; 
28
29	.cont-mediateca .card-reco-img-container img { 
30    height: 440px; 
31
32
33@media (min-width: 992px) { 
34	.lfr-pagination, .taglib-categorization-filter { 
35		max-width: 960px; 
36
37	.cont-mediateca .card-reco-img-container img { 
38    height: 270px; 
39
40
41@media (min-width: 1200px) { 
42	.lfr-pagination, .taglib-categorization-filter { 
43		max-width: 1180px; 
44
45	.cont-mediateca .card-reco-img-container img { 
46    height: 340px; 
47	}	 
48
49@media (min-width: 1440px) { 
50	.lfr-pagination, .taglib-categorization-filter { 
51		max-width: 1260px; 
52
53
54@media (min-width: 992px) { 
55	.lfr-pagination .lfr-pagination-buttons { 
56		gap: 1rem; 
57		margin-left: auto; 
58
59
60.taglib-categorization-filter em { 
61		margin-left: 1rem; 
62	}	 
63</style> 
64 
65<!-- funciones --> 
66<#function getJournalArticleRootElement journal> 
67	<#attempt> 
68		<#if journal?has_content> 
69			<#local journalLocaleContent = journal.getContentByLocale(locale.toString()) />		 
70			<#local journalContentXml = saxReaderUtil.read(journalLocaleContent) />		 
71			<#local rootElementContent = journalContentXml.getRootElement() /> 
72			<#if rootElementContent?? && rootElementContent?has_content>					 
73				<#return rootElementContent />				 
74			</#if> 
75		</#if>			 
76	<#recover > 
77	</#attempt>	 
78	<#return "" /> 
79</#function> 
80 
81<#function getXmlTextElement rootElementContent fieldReference> 
82	<#attempt> 
83		<#local xPathSelector = saxReaderUtil.createXPath("dynamic-element[@field-reference='" + fieldReference + "']") /> 
84		<#local element = xPathSelector.selectSingleNode(rootElementContent) /> 
85		<#return element.getStringValue() /> 
86	<#recover > 
87	</#attempt>	 
88	<#return "" /> 
89</#function> 
90 
91<#function obtenerCamposRepetidos documentRoot fieldReference > 
92<#return documentRoot.selectNodes("dynamic-element[@field-reference='" + fieldReference + "']")/> 
93</#function> 
94 
95<#function getUrlDocumento documentJson> 
96	<#attempt> 
97        <#local url = documentJson.url /> 
98        <#if !url?has_content> 
99            <#local url = "/documents/" + documentJson.groupId + "/" + documentJson.uuid />       
100		<!--<#else> 
101			<#if url?contains("/d/guest/")> 
102				<#local url = url?replace("/d/guest/", "/d/cis/") /> 
103			</#if> 
104        </#if>--> 
105        <#return removeUrlParams(url) /> 
106	<#recover > 
107	</#attempt>	 
108	<#return "" /> 
109</#function> 
110 
111 
112<#if entries?has_content> 
113    <div class="fd-gris-fondo py-50 py-lg-100 cont-convo cont-mediateca"> 
114        <div class="container px-3 px-lg-0"> 
115            <div class="content-cards cols-items-4"> 
116                <#-- Iterar sobre los contenidos obtenidos en la ADT --> 
117                <#list entries as curEntry> 
118                    <#assign 
119                        curEntry = curEntry 
120                        renderer = curEntry.getAssetRenderer() 
121                        entryTitle = htmlUtil.escape(renderer.getTitle(locale)) 
122                        viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, renderer, curEntry, !stringUtil.equals(assetLinkBehavior, "showFullContent"))/> 
123           			<#assign journalArticle = renderer.getArticle()/> 
124        			<#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale.toString())) /> 
125		        	<#assign entryTitle = htmlUtil.escape(renderer.getTitle(locale))/> 
126			        <#assign entryResumen = htmlUtil.escape(renderer.getSummary())/>   
127 
128                    <#assign EnlaceExterno=document.valueOf("//dynamic-element[@field-reference='URLEnlaceContenido']/dynamic-content/text()") /> 
129 
130                    <#assign imgGS=document.valueOf("//dynamic-element[@field-reference='ImagenPrincipal']/dynamic-content/text()") /> 
131                    <#assign imgUuidGS = "" /> 
132                    <#assign imgNameGS = "" /> 
133                    <#assign imgGroupIdGS = "" /> 
134                    <#assign imgAltGS = "" />									 
135									 
136                    <#if imgGS?? && imgGS != "" && imgGS?trim != "{}"> 
137                        <#assign imgUuidGS = imgGS?eval.uuid!"" /> 
138                    </#if>				 
139                    <#if imgUuidGS?has_content> 
140                        <#assign imgNameGS = imgGS?eval.title /> 
141                        <#assign imgGroupIdGS = imgGS?eval.groupId /> 
142                    </#if>                     
143 
144                    <div class="cardReco h-auto"> 
145                        <div class="h-100 d-flex flex-column justify-content-between">  
146                            <div class="asset-abstract">                                                                
147                                <div class="lfr-meta-actions asset-actions"> 
148                                    <@getEditIcon /> 
149                                </div>                                                                                       
150                            </div> 
151 
152                            <div class="d-flex flex-column h-100 gap-1r position-relative"> 
153                                <div class="p-0"> 
154                                    <#if imgUuidGS?has_content> 
155                                        <div class="card-reco-img-container"> 
156                                            <img class="w-100"  alt="imagen de la noticia"  src="/documents/${imgGroupIdGS}/0/${imgNameGS}/${imgUuidGS}" /> 
157                                        </div> 
158                                    <#else> 
159                                        <div class="card-reco-img-container"> 
160                                            <img class="w-100" alt="imagen de la noticia" src="/documents/d/${themeDisplay.getScopeGroup().getFriendlyURL()}/generica" /> 
161                                        </div> 
162                                    </#if> 
163                                </div> 
164 
165 
166                                <!-- Primero se pregunta si el campo Enlace Externo tiene contenido si es así se enlaza a la página que se indica--> 
167                                <#if EnlaceExterno?has_content>  
168                                    <#assign UrlDoc = EnlaceExterno /> 
169                                <#else> 
170                                    <!-- Si no tiene enlace externo tiene documento --> 
171                                    <#assign documentRoot = getJournalArticleRootElement(journalArticle) />		 
172                                     
173                                    <#assign Doc = obtenerCamposRepetidos(documentRoot, "Documentos") /> 
174                                    <#if Doc?has_content> 
175                                         
176                                        <#list Doc as cur_Doc> 
177                                            <#assign TextoDoc = getXmlTextElement(cur_Doc, "TituloDelDocumento")> 
178                                            <#assign JsonDoc = getXmlTextElement(cur_Doc, "Documento")> 
179                                             
180                                            <!-- se trata la URL del Json que para obtener la url correcta y quitando despues de la ? el contenido para que aparezca el pdf--> 
181                                            <#assign jsonObj = jsonFactory.createJSONObject(JsonDoc) /> 
182                                            <#assign URLJson = jsonObj.getString("url") /> 
183                                            <#assign URLJsongroupId = jsonObj.getString("groupId") /> 
184                                            <#assign URLJsonuuid = jsonObj.getString("uuid") /> 
185                                            <#assign UrlDoc = "/documents/${URLJsongroupId}/${URLJsonuuid}" /> 
186                                        </#list> 
187                                    </#if> 
188                                </#if> 
189 
190                                <div class="card-text-cont"> 
191                                    <a class="title elipsis-3 enlace-total" href="${UrlDoc}" target="_blank" title="Ir al documento ${entryTitle}. Abre en ventana nueva">${entryTitle}</a> 
192                                </div> 
193                            </div> 
194                        </div> 
195                    </div>                 
196                </#list> 
197            </div> 
198        </div> 
199    </div> 
200</#if> 
201 
202<#-- CARGA DE LA EDICIÓN EN VENTANA A PARTE --> 
203<#macro getEditIcon> 
204    <#if renderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
205        <#assign editPortletURL = renderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("NORMAL"), themeDisplay.getURLCurrent())!"" /> 
206        <#if validator.isNotNull(editPortletURL)> 
207            <#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) /> 
208            <@liferay_ui["icon"] 
209                cssClass="icon-monospaced visible-interaction text-left" 
210                icon="pencil" 
211                markupView="lexicon" 
212                message=title 
213                url=editPortletURL.toString() 
214            /> 
215        </#if> 
216    </#if> 
217</#macro> 
218 
219<#macro getFullContent> 
220    <#assign pagina = renderer.render(renderRequest, renderResponse, "full_content") /> 
221	<@liferay_util["include"] 
222		page="${pagina}" 
223	/> 
224</#macro>