Te puede interesar 48 VIDEOS

Agrégateur de contenus

Agrégateur de contenus

Agrégateur de contenus

Agrégateur de contenus

Agrégateur de contenus

Une erreur s'est produite lors du traitement du gabarit.
The following has evaluated to null or missing:
==> saxReaderUtil.createXPath("dynamic-element[@name='Irudia']/dynamic-element[@name='Irudi_urla']/dynamic-content").selectSingleNode(rootElement0)  [in template "20907#20945#2108745" at line 70, column 48]

----
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: #assign imagen_urla = saxReaderUtil.c...  [in template "20907#20945#2108745" at line 70, column 25]
----
1<#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
2<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
3<#assign DlAppServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppServiceUtil"] /> 
4<#assign AssetVocabularyLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyLocalServiceUtil"]> 
5<#assign StringUtil = staticUtil["com.liferay.portal.kernel.util.StringUtil"]> 
6<#assign images_folder = themeDisplay.getPathThemeImages() /> 
7<#assign formato_idioma = "yyyy/MM/dd" /> 
8<#assign num=100> 
9<#if locale == 'es_ES' > 
10    <#assign formato_idioma = "dd/MM/yyyy" /> 
11<#elseif locale == 'eu_ES' > 
12    <#assign formato_idioma = "yyyy/MM/dd" /> 
13<#elseif locale == 'en_EN' > 
14    <#assign formato_idioma = "yyyy/MM/dd" /> 
15<#else> 
16    <#assign formato_idioma = "yyyy/MM/dd" /> 
17</#if> 
18 
19 
20<#assign contador = 0 /> 
21 
22 
23<div id="izfe-home-actualidad" class="pt-4 pb-4"> 
24    <#if entries?has_content> 
25        <div class="container"> 
26            <div class="row"> 
27                <div class="col-12 text-blue-dark-main"> 
28                    <h2 class="mb-4"> 
29                        <strong> 
30                            <@liferay.language key="DGN.ultimas" />  
31                        </strong>  
32                        <@liferay.language key="DGN.noticias" /> 
33                    </h2> 
34                </div> 
35            </div> 
36            <div class="row"> 
37                <#list entries as curEntry> 
38                    <#assign renderer = curEntry.getAssetRenderer() > 
39                    <#assign className = renderer.getClassName() > 
40                    <#assign fileEntryId=""> 
41                    <#assign map_image=""> 
42                    <#assign image=""> 
43                     
44 
45                    <#assign journalArticle = renderer.getArticle() > 
46                    <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
47                    <#assign rootElement0 = document.getRootElement() > 
48                     
49                         
50                    <#assign titulo = renderer.getTitle(locale)> 
51                    <#assign titulofixed = titulo?replace('"','')> 
52 
53                    <#assign data_string = saxReaderUtil.createXPath("dynamic-element[@name='Data']/dynamic-content").selectSingleNode(rootElement0).getStringValue() >     
54                    <#assign Data_DateObj = dateUtil.parseDate("yyyy-MM-dd", data_string, locale)>        
55                    <#assign data_string = dateUtil.getDate(Data_DateObj, formato_idioma, locale)> 
56 
57                    <#assign resumen = saxReaderUtil.createXPath("dynamic-element[@name='Laburpena']/dynamic-content").selectSingleNode(rootElement0).getStringValue() > 
58                    <#assign imagen = saxReaderUtil.createXPath("dynamic-element[@name='Irudia']/dynamic-content").selectSingleNode(rootElement0).getStringValue() > 
59                     
60                    <#if imagen?has_content > 
61                        <#assign map_image = imagen?eval> 
62                        <#if map_image?has_content && map_image.uuid?has_content && map_image.uuid?? && map_image.groupId?has_content && map_image.groupId??>    
63                            <#assign imgDLFile = DLFileEntryLocalService.fetchDLFileEntryByUuidAndGroupId(map_image.uuid, map_image.groupId?number) /> 
64                            <#assign fileEntryId = imgDLFile.getFileEntryId() /> 
65                        </#if> 
66                    </#if> 
67 
68                    <#assign imagen_urla = "" /> 
69                    <#if saxReaderUtil.createXPath("dynamic-element[@name='Irudia']/dynamic-content").selectSingleNode(rootElement0)?has_content > 
70                        <#assign imagen_urla = saxReaderUtil.createXPath("dynamic-element[@name='Irudia']/dynamic-element[@name='Irudi_urla']/dynamic-content").selectSingleNode(rootElement0).getStringValue() /> 
71                    </#if>  
72 
73                    <#assign linkNoticia = renderer.getURLViewInContext(renderRequest, renderResponse, '') > 
74                    <#assign categories = curEntry.getCategories()> 
75                    <#assign tituloAlt=titulo> 
76                   <#if tituloAlt?length gte 150> 
77                        <#assign tituloAlt=tituloAlt[0..140]+"..."> 
78                   </#if> 
79 
80                    <#if contador == 0> 
81                        <div class="col-12 mb-5"> 
82                            <div class="row"> 
83                                <div class="col-12 col-md-6 mb-2"> 
84                                    <#if fileEntryId?? && fileEntryId?has_content>  
85                                        <@adaptive_media_image["img"] alt="${tituloAlt}" class="w-100 izfe-height-330" fileVersion=DlAppServiceUtil.getFileEntry(fileEntryId?number).getFileVersion()/> 
86                                    <#elseif map_image?has_content && map_image.groupId?? && map_image.groupId?has_content && map_image.classPK?? && map_image.classPK?has_content && map_image.title?? && map_image.title?has_content && map_image.uuid?? && map_image.uuid?has_content>  
87                                        <img aria-describedby="${titulo?replace('"',' ')}" alt="${tituloAlt?replace('"',' ')}" title="${titulo?replace('"',' ')}" class="w-100 izfe-height-300" src="/documents/${map_image.groupId}/${map_image.classPK}/${map_image.title}/${map_image.uuid}"> 
88                                    <#elseif imagen_urla?has_content>  
89                                        <img aria-describedby="${titulo?replace('"',' ')}" alt="${tituloAlt?replace('"',' ')}" title="${titulo?replace('"',' ')}" class="w-100 izfe-height-330" src="${imagen_urla}"> 
90                                    <#else> 
91                                        <img alt="img-not-found" title="img-not-found" class="w-100 izfe-height-330"src="${images_folder}/izfe/img-not-found.png">  
92                                    </#if> 
93                                </div> 
94                                <div class="col-12 col-md-6 d-flex flex-column"> 
95                                    <div class="d-flex align-items-center mb-2">                                   
96                                    <#if categories?has_content > 
97                                        <#assign tiene_cat = false/> 
98                                        <#list categories as category> 
99                                            <#assign vocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(category.getVocabularyId()) /> 
100                                            <#if vocabulary.getName() == "gaia" > 
101                                                <#assign tiene_cat = true/> 
102                                            </#if> 
103                                        </#list> 
104 
105                                        <#if tiene_cat> 
106                                            <ul class="d-flex align-items-center flex-wrap list-inline list-unstyled p-0 m-0"> 
107                                                <#if (data_string?? && data_string?has_content)> 
108                                                    <li class="small izfe-semibold text-black mb-0 mr-2">${data_string}</li>                                                                                                                                                                                          
109                                                </#if> 
110                                                <#list categories as category> 
111                                                    <#assign vocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(category.getVocabularyId()) /> 
112                                                    <#if vocabulary.getName() == "gaia" > 
113                                                        <li class="list-inline-item font-weight-bold mr-2"> 
114                                                            <a href="/noticias?category=${category.getCategoryId()}" class="text-nowrap text-uppercase"> 
115                                                                <p class="m-0 small">${category.getTitle(locale)}</p> 
116                                                            </a> 
117                                                        </li> 
118                                                    </#if> 
119                                                </#list> 
120                                            </ul> 
121                                        <#else> 
122                                            <#if (data_string?? && data_string?has_content)> 
123                                                <p class="small izfe-semibold text-black mb-0 mr-2">${data_string}</p>                                                                                                                                                                                          
124                                            </#if> 
125                                        </#if> 
126                                    </#if>    
127                                    </div>   
128                                    <h2 class="izfe-title mb-3"> 
129                                        <a class="text-black izfe-semibold izfe-ultimas-noticias-title" href="${linkNoticia}"> 
130                                            ${curEntry.getTitle(locale)} 
131                                        </a> 
132                                    </h2> 
133                                    <#if (resumen?? && resumen?has_content)> 
134                                        <h3 id="izfe-ultimas-noticias-resumen-destacada" class="text-black resumen-mobile"> 
135                                            <#--  ${StringUtil.shorten(resumen?trim,num)}  --> 
136                                            ${resumen} 
137                                        </h3> 
138                                    </#if>                                         
139                                </div> 
140                            </div> 
141                        </div> 
142                    <#elseif contador gt 0 && contador lt 4 > 
143                        <div class="col-12 col-md-6 col-lg-4 mb-5"> 
144                            <div class="row"> 
145                                <div class="col-12 mb-2"> 
146                                     <#if fileEntryId?? && fileEntryId?has_content>  
147                                        <@adaptive_media_image["img"] alt="${tituloAlt}" class="w-100 izfe-height-250" fileVersion=DlAppServiceUtil.getFileEntry(fileEntryId?number).getFileVersion()/> 
148                                    <#elseif map_image?has_content && map_image.groupId?? && map_image.groupId?has_content && map_image.classPK?? && map_image.classPK?has_content && map_image.title?? && map_image.title?has_content && map_image.uuid?? && map_image.uuid?has_content>  
149                                        <img alt="${tituloAlt?replace('"',' ')}" aria-describedby="${titulo?replace('"',' ')}" title="${titulo?replace('"',' ')}" class="w-100 izfe-height-250" src="/documents/${map_image.groupId}/${map_image.classPK}/${map_image.title}/${map_image.uuid}"> 
150                                    <#elseif imagen_urla?has_content>  
151                                        <img aria-describedby="${titulo?replace('"',' ')}" alt="${tituloAlt?replace('"',' ')}" title="${titulo?replace('"',' ')}" class="w-100 izfe-height-250" src="${imagen_urla}"> 
152                                    <#else> 
153                                        <img alt="img-not-found" title="img-not-found" class="w-100 izfe-height-250"src="${images_folder}/izfe/img-not-found.png">  
154                                    </#if> 
155                                </div> 
156                                <div class="col-12 d-flex flex-column "> 
157                                    <div class="d-flex align-items-center mb-2"> 
158                                         
159                                        <#if categories?has_content > 
160                                            <#assign tiene_cat = false/> 
161                                            <#list categories as category> 
162                                                <#assign vocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(category.getVocabularyId()) /> 
163                                                <#if vocabulary.getName() == "gaia" > 
164                                                    <#assign tiene_cat = true/> 
165                                                </#if> 
166                                            </#list> 
167                                            <ul class="d-flex align-items-center flex-wrap list-inline list-unstyled p-0 m-0"> 
168                                                <#if (data_string?? && data_string?has_content)> 
169                                                    <li class="list-inline-item small izfe-semibold text-black m-0 mr-2">${data_string}</li>                                                                                                                                                                                          
170                                                </#if> 
171                                                <#list categories as category> 
172                                                    <#assign vocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(category.getVocabularyId()) /> 
173                                                    <#if vocabulary.getName() == "gaia" > 
174                                                        <li class="list-inline-item font-weight-bold mr-2"> 
175                                                            <a href="/noticias?category=${category.getCategoryId()}" class="text-nowrap text-uppercase"> 
176                                                                <p class="m-0 small">${category.getTitle(locale)}</p> 
177                                                            </a> 
178                                                        </li> 
179                                                    </#if> 
180                                                </#list> 
181                                            </ul> 
182                                        <#else> 
183                                             <#if (data_string?? && data_string?has_content)> 
184                                                <p class="small izfe-semibold text-black m-0 mr-2">${data_string}</p>                                                                                                                                                                                          
185                                            </#if> 
186                                        </#if>  
187                                    </div>   
188                                    <h3 class="mb-3"> 
189                                        <a class="izfe-semibold text-black izfe-ultimas-noticias-title" href="${linkNoticia}"> 
190                                            ${curEntry.getTitle(locale)} 
191                                        </a> 
192                                    </h3> 
193                                    <#if (resumen?? && resumen?has_content)> 
194                                        <p class="text-black izfe-ultimas-noticias-resumen"> 
195                                            <#--  ${StringUtil.shorten(resumen?trim,num)}  --> 
196                                            ${resumen} 
197                                        </p> 
198                                    </#if> 
199                                     
200                                </div> 
201                            </div> 
202                        </div> 
203                    <#elseif contador gt 3 > 
204                        <div class="col-12 col-lg-4 mb-4"> 
205                            <div class="row"> 
206                                <div class="col-12"> 
207                                    <div class="d-flex align-items-center flex-wrap mb-2"> 
208                                         
209                                        <#if categories?has_content > 
210                                            <#assign tiene_cat = false/> 
211                                            <#list categories as category> 
212                                                <#assign vocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(category.getVocabularyId()) /> 
213                                                <#if vocabulary.getName() == "gaia" > 
214                                                    <#assign tiene_cat = true/> 
215                                                </#if> 
216                                            </#list> 
217                                            <ul class="d-flex align-items-center flex-wrap list-inline list-unstyled p-0 m-0"> 
218                                                <#if (data_string?? && data_string?has_content)> 
219                                                    <li class="small izfe-semibold text-black m-0 mr-2">${data_string}</li>                                                                                                                                                                                          
220                                                </#if> 
221                                                <#list categories as category> 
222                                                    <#assign vocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(category.getVocabularyId()) /> 
223                                                    <#if vocabulary.getName() == "gaia" > 
224                                                        <li class="list-inline-item font-weight-bold m-0 mr-2"> 
225                                                            <a href="/noticias?category=${category.getCategoryId()}" class="text-nowrap text-uppercase"> 
226                                                                <p class="m-0 small">${category.getTitle(locale)}</p> 
227                                                            </a> 
228                                                        </li> 
229                                                    </#if> 
230                                                </#list> 
231                                            </ul> 
232                                        </#if> 
233                                    </div> 
234                                    <#if data?? && data?has_content > 
235                                        <p class="small izfe-semibold text-grey-dark mt-3 mb-3"> 
236                                            ${data} 
237                                        </p> 
238                                    </#if> 
239                                    <h4> 
240                                        <a href="${linkNoticia}" class="izfe-semibold text-black izfe-ultimas-noticias-title">${curEntry.getTitle(locale)}</a> 
241                                    </h4>                                     
242                                </div> 
243                            </div> 
244                        </div> 
245                    </#if> 
246                    <#assign contador++ /> 
247                </#list> 
248            </div> 
249            <div class="d-flex col-12 justify-content-center mt-4"> 
250                <a href="/noticias" class="izfe-btn-blue"> 
251                    <@liferay.language key="DGN.ver-todas-noticias" /> 
252                </a> 
253            </div> 
254        </div> 
255    </#if> 
256</div> 
257 
258<style> 
259    @media (max-width: 768px){ 
260        #izfe-home-actualidad .izfe-title{ 
261            font-size: 24px; 
262
263        .resumen-mobile{ 
264            font-size: 15px !important; 
265
266
267 
268    @media (min-width: 768px){ 
269        .resumen-mobile{ 
270            font-size: 20px !important; 
271
272
273     
274    /* TAMAÑO DE IMAGENES */ 
275 
276    #izfe-home-actualidad .izfe-height-250{ 
277        height: auto; 
278
279    @media (min-width: 768px){ 
280        #izfe-home-actualidad .izfe-height-250 { 
281            height: 250px; 
282
283
284</style> 
285 
286<script> 
287    //RECORTAR TEXTO SIN CORTAR PALABRAS 
288 
289    recortarTexto(160, 'izfe-ultimas-noticias-title', null) 
290    recortarTexto(250, null, 'izfe-ultimas-noticias-resumen-destacada') 
291    recortarTexto(160, 'izfe-ultimas-noticias-resumen', null) 
292 
293 
294    function recortarTexto(limit, classResumen, idResumen){ 
295        if(idResumen == null){ 
296            var resumenes = document.getElementsByClassName(classResumen); 
297        }else{   
298            var resumenes = [document.getElementById(idResumen)]; 
299        }    
300 
301        console.log(resumenes, resumenes.length) 
302 
303        for(var i = 0; i < resumenes.length; i++){ 
304            var resumen = resumenes[i].innerText; 
305            if(resumen.length > limit){ 
306                if(resumen[limit].toString() != ' '){ 
307                    var indiceRecorte = limit; 
308 
309                    for(var j = limit; j > 0; j--){ 
310                        if(resumen[j] == ' '){ 
311                            indiceRecorte = j; 
312                            break; 
313
314
315                    resumenes[i].innerText = resumen.toString().substr(0, j) + '...'; 
316                }else{ 
317                    resumenes[i].innerText = resumen.toString().substr(0, limit) + '...'; 
318
319
320
321
322 
323</script> 

Agrégateur de contenus