Noticias

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 73:
Lexical error: encountered "u" (117), after "\"Screenshot 2026-02-02 at 2.42.19\\".
---end-message---

The failing expression:
==> imgGS?eval  [in template "20096#20122#8049024" at line 59, column 38]

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign imgUuidGS = imgGS?eval.uuid!""  [in template "20096#20122#8049024" at line 59, column 17]
----
1<!-- AECID-CC-Listado-Noticias --> 
2 
3 
4<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
5<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
6<#assign journalArticleResourceLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService") /> 
7<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
8<#assign currentUrlEncoded = urlCodec.encodeURL(themeDisplay.getURLCurrent()) /> 
9 
10<#-- ID del vocabulario global (cambia esto por el ID real) --> 
11<#assign vocabularyId = 7627551 /> 
12 
13<#if entries?has_content> 
14    <div class="py-50 "> <!--- fd-gris-fondo py-lg-100 --> 
15        <#list entries as curEntry> 
16            <#assign 
17                curEntry = curEntry 
18                renderer = curEntry.getAssetRenderer() 
19                entryTitle = htmlUtil.escape(renderer.getTitle(locale)) 
20                viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, renderer, curEntry, !stringUtil.equals(assetLinkBehavior, "showFullContent"))/> 
21 
22            <!-- Para obetener de que tipo de estructura estamos tratando--> 
23            <#assign classPK = curEntry.classPK /> 
24            <#if classPK??> 
25                <#assign journalArticle = journalArticleLocalService.getLatestArticle(classPK) /> 
26                <#assign ddmStructure = journalArticle.getDDMStructure() /> 
27                <!--<p>ID de la estructura: ${ddmStructure.getStructureId()}</p>--> 
28                <#assign IdEstructura = journalArticle.getDDMStructure() /> 
29            </#if> 
30             
31            <#assign journalArticle = renderer.getArticle()/> 
32            <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale.toString())) /> 
33            <#assign entryTitle = htmlUtil.escape(renderer.getTitle(locale))/>         
34 
35            <!-- Si la estructura es AECID-CC-Eventos --> 
36            <#if IdEstructura == '2194397'> 
37                <#assign entryTitle = htmlUtil.escape(renderer.getTitle(locale))/> 
38                <#assign titulo=document.valueOf("//dynamic-element[@field-reference='title']/dynamic-content/text()") /> 
39                <#assign imgGS=document.valueOf("//dynamic-element[@field-reference='image']/dynamic-content/text()") /> 
40                <#assign subtitulo =document.valueOf("//dynamic-element[@field-reference='Subtitulo']/dynamic-content/text()") /> 
41  
42            <#else> <!-- Está sería la otra opción, la estructura de NOTICIA GLOBAL --> 
43                <#assign entryTitle = htmlUtil.escape(renderer.getTitle(locale))/> 
44                <#assign titulo=document.valueOf("//dynamic-element[@field-reference='title']/dynamic-content/text()") /> 
45                <#assign imgGS=document.valueOf("//dynamic-element[@field-reference='image']/dynamic-content/text()") /> 
46                <#assign subtitulo =document.valueOf("//dynamic-element[@field-reference='resumen']/dynamic-content/text()") /> 
47 
48            </#if> 
49 
50            <!-- Tratar la imagen --> 
51							 
52            <#assign imgGS = imgGS?replace("\\u2019", "") /> 
53            <#assign imgGS = imgGS?replace("\\u00e7", "") /> 
54            <#assign imgGS = imgGS?replace("\\u00b7", "") /> 
55            <#assign imgGS = imgGS?replace("\\u2013", "-") />							 
56							 
57            <#assign imgUuidGS = "" /> 
58            <#if imgGS?? && imgGS != "" && imgGS?trim != "{}"> 
59                <#assign imgUuidGS = imgGS?eval.uuid!"" /> 
60            </#if>				 
61            <#if imgUuidGS?has_content> 
62                <#assign imgNameGS = imgGS?eval.title /> 
63                <#assign imgGroupIdGS = imgGS?eval.groupId /> 
64                <#assign imgAltGS = imgGS?eval.alt/> 
65            </#if>	 
66 
67            <div class="container px-3 px-lg-0 mt-2"> 
68                <div class="actu-card"> 
69 
70                    <div class="cont-img"> 
71                        <div class="asset-abstract">                                                                
72                            <div class="lfr-meta-actions asset-actions"> 
73                                <@getEditIcon /> 
74                            </div>                                                                                       
75                        </div> 
76                        <#if imgUuidGS?has_content> 
77													<#if imgAltGS == ""> 
78														<#assign imgAltGS = titulo/> 
79													</#if> 
80                            <img class="actu-img rounded-0" data-widget="image" src="/documents/${imgGroupIdGS}/0/${imgNameGS}/${imgUuidGS}" alt="${imgAltGS?truncate(150, '...')}" ${(imgAltGS?length > 150)?then('longdesc="' + imgAltGS + '"', '')}> 
81                        <#else> 
82                            <img alt="Imagen decorativa " class="actu-img rounded-0" src="/documents/d/${themeDisplay.getScopeGroup().getFriendlyURL()}/generica"> 
83                        </#if> 
84                    </div> 
85 
86                    <div class="d-flex flex-column justify-content-between w-100"> 
87                        <div class="actu-body"> 
88                            <p class="mb-2 txt-h6 txt-lg-h5 txt-bold elipsis-2">${titulo}</p> 
89                            <p class="mb-2">${subtitulo} </p> 
90                        </div> 
91                        <div class="d-md-flex flex-wrap align-items-center justify-between mt-4"> 
92                            <!-- Para pintar las categorias del contenido pero solo las que sean del vocabulario --> 
93                            <#assign classPK = curEntry.getClassPK() /> 
94                            <#assign assetEntry = assetEntryLocalService.fetchEntry(entry.getClassName(), classPK) /> 
95                            <#if assetEntry??> 
96                                <#assign categoryIds = assetEntry.getCategoryIds() /> 
97 
98                                <#-- Filtrar categorías que pertenezcan al vocabulario global --> 
99                                <#assign categories = [] /> 
100                                <#list categoryIds as categoryId> 
101                                    <#assign category = assetCategoryLocalService.fetchAssetCategory(categoryId) /> 
102                                    <#if category?? && category.getVocabularyId() == vocabularyId> 
103                                        <#assign cat = category.getName() /> 
104 
105                                        <#assign portalURL = themeDisplay.portalURL> 
106                                        <#assign currentPageName = themeDisplay.layout.name> 
107                                        <#assign siteName = themeDisplay.siteGroupName> 
108                                        <#assign siteName = siteName?replace(" ", "")> 
109                                        <#assign siteName = siteName?lower_case> 
110                                        <#assign URLCategoria = portalURL + "/web/" + siteName + "/detalle-categorias/-/categories/" + category.getCategoryId()> 
111 
112                                        <#switch cat> 
113                                            <#case "Infantil"> 
114                                                <a class="cat-reco cat-ver mr-2 mt-2" href="${URLCategoria}" title="Filtar Por ${cat}">${cat}</a> 
115                                                <#break> 
116                                            <#case "Musica"> 
117                                                <a class="cat-reco cat-cia mr-2 mt-2" href="${URLCategoria}" title="Filtar Por ${cat}">${cat}</a> 
118                                                <#break> 
119                                            <#case "Letras"> 
120                                                <a class="cat-reco cat-nar mr-2 mt-2" href="${URLCategoria}" title="Filtar Por ${cat}">${cat}</a>	 
121                                                <#break> 
122                                            <#case "Escenicas"> 
123                                                <a class="cat-reco cat-ama mr-2 mt-2" href="${URLCategoria}" title="Filtar Por ${cat}">${cat}</a> 
124                                                <#break> 
125                                            <#case "Formacion"> 
126                                                <a class="cat-reco cat-roj mr-2 mt-2" href="${URLCategoria}" title="Filtar Por ${cat}">${cat}</a>	    
127                                                <#break> 
128                                            <#case "Cine"> 
129                                                <a class="cat-reco cat-mor mr-2 mt-2" href="${URLCategoria}" title="Filtar Por ${cat}">${cat}</a>	 
130                                                <#break>                     
131                                            <#default> 
132                                                <a class="cat-reco cat-neg mr-2 mt-2" href="${URLCategoria}" title="Filtar Por ${cat}">${cat}</a>	 
133                                                <#break>      
134                                        </#switch> 
135                                    </#if> 
136 
137                                </#list> 
138 
139                            </#if> 
140 
141 
142                            <!-- Obtiene la información necesaria para poder construir la URL para la página de detalle ya sea para contenidos de su site o de otro site --> 
143                            <#assign articleId = journalArticle.getArticleId() /> 
144                            <#assign sitio = curEntry.getGroupId() /> 
145                            <#assign siteURL = "" /> 
146                            <#if themeDisplay??> 
147                                <#assign siteURL = themeDisplay.getPortalURL() /> 
148                                <#if siteURL?ends_with("/")> 
149                                    <#assign siteURL = siteURL[0..siteURL?length - 2]> 
150                                </#if> 
151                            </#if> 
152                            <#assign linkDetalle = ""/> 
153                            <#assign siteURLCentro = themeDisplay.getScopeGroup().getFriendlyURL() /> 
154                             
155                            <#assign linkDetalle = "${siteURL}/web${siteURLCentro}/actualidad/noticias/detalle-noticias?articulo=${articleId}&sitio=${sitio}&redirect=" + currentUrlEncoded /> 
156 
157                            <a class="ml-auto txt-deco-no txt-bold text-uppercase" href="${linkDetalle}" title="Ir a  ${titulo}">Leer más <span class="sr-only"> ${titulo}</span></a> 
158                            <!--<p>${linkDetalle}</p>--> 
159                        </div> 
160                    </div> 
161 
162                </div> 
163            </div>         
164            <hr> 
165        </#list> 
166    </div> 
167<#else>	 
168	<div class="container"> 
169<p>En este momento, no contamos con ninguna noticia</p>	 
170		 
171	</div> 
172</#if> 
173 
174 
175<#-- CARGA DE LA EDICIÓN EN VENTANA A PARTE --> 
176<#macro getEditIcon> 
177    <#if renderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
178        <#assign editPortletURL = renderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("NORMAL"), themeDisplay.getURLCurrent())!"" /> 
179        <#if validator.isNotNull(editPortletURL)> 
180            <#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) /> 
181            <@liferay_ui["icon"] 
182                cssClass="icon-monospaced visible-interaction text-left" 
183                icon="pencil" 
184                markupView="lexicon" 
185                message=title 
186                url=editPortletURL.toString() 
187            /> 
188        </#if> 
189    </#if> 
190</#macro>