Vés enrere

En qué tipo de vivienda reside la población española

S'ha produït un error mentre es processava la plantilla.
Expression dynamicElement.attributeValue("name") is undefined on line 496, column 50 in 20155#20195#199123.
1<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
2<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
3<#assign getterUtil = staticUtil["com.liferay.portal.kernel.util.GetterUtil"] /> 
4<#assign article = journalArticleLocalService.getArticle(getterUtil.getLong(groupId),.vars['reserved-article-id'].data)> 
5<#assign entry = assetEntryLocalService.getEntry('com.liferay.portlet.journal.model.JournalArticle', article.resourcePrimKey) > 
6<#assign assetCategoryPropertyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService")> 
7<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService")> 
8 
9<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()> 
10<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
11 
12<#assign assetEntryQueryService = objectUtil('com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil')> 
13 
14 
15<#assign vocabularyIdTemaP = propsUtil.get("vocabulary.tematica.principal")?number /> 
16<#assign vocabularyIdTemaS = propsUtil.get("vocabulary.tematica.secundario")?number /> 
17<#assign vocabularyIdTipoC = propsUtil.get("vocabulary.tipo.contenido")?number /> 
18<#assign vocabularyIdTipoContenidoCategoryE = propsUtil.get("vocabulary.tipo.contenido.category.excluded") /> 
19 
20<#assign categories = entry.getCategories() /> 
21<#assign categoriesPrincipal  = getCategories(categories vocabularyIdTemaP)> 
22<#assign categoriesSecundaria = getCategories(categories vocabularyIdTemaS)> 
23 
24 
25<#assign display=""> 
26	<div class="container-fluid article-content" id="content-wrapper">	 
27		 
28		<#assign  mostar = TITLE.getSiblings()?size> 
29	    <#if TITLE.getSiblings()?has_content &&  mostar != 1>	    	 
30		    <div class="col-md-1 col-sm-1 col-xs-1"> 
31		    	<aside id='scroll-nav' class=" article-aside hidden-sm hidden-xs" style="top: 0px;"><!-- reports --> 
32		    	 
33					<ul class="scroll-list"> 
34						<li class="arrow up"><a href="#section1"><span class="fa fa-angle-up"></span></a></li>						 
35						<#assign lastSection = "1">												 
36						<#list TITLE.getSiblings() as item >	                        	                         
37	                        <li data-toggle="tooltip" data-placement="right" title="" data-original-title='${item.ORDER.getData()}.${item.getData()}' class=""><a href='#section${item.ORDER.getData()}'><span class="fa fa-circle-o"></span></a></li>	                        																 	 
38						 	<#assign lastSection = item.ORDER.getData()> 
39						</#list>						 
40						<li class="arrow down"><a href="#section${lastSection}"><span class="fa fa-angle-down"></span></a></li> 
41					</ul>			 
42				</aside><!-- /article -->			 
43			</div> 
44		</#if> 
45		 
46		<div class="col-md-8 col-sm-12 col-xs-12 cos-article">	 
47				<section class="row article" > 
48					<article class="scroll-nav__section" id="section0"> 
49					 
50						<div class="pos-sup"> 
51							<section class="date-content"> 
52									<span class="posted-on"><time datetime="${MONTH.getData()} ${YEAR.getData()}">${MONTH.getData()} ${YEAR.getData()}</time></span> 
53							</section> 
54							 
55							<#assign pathThemeImage = themeDisplay.getPathThemeImage() />  							 
56							<div class="print-action hidden-sm hidden-xs">						 
57								<span class="">  
58								<a href="javascript:print();" class=" taglib-icon">  
59									<img id="bhfa__column1__0" src="${pathThemeImage}/spacer.png"> 									 
60								</a>  
61								</span> 
62							</div> 
63							 
64						</div> 
65						<div class="titulo-content"> 
66					        	<h1 class="main-h1">${Titulo.getData()}</h1>					        	 
67					    </div> 
68						<#if Subtitol.getData()?has_content > 
69							 <div class="subtitulo-content">								 
70								<h1 class="main-h1">${Subtitol.getData()}</h1> 
71							</div> 
72						</#if> 
73 
74						<#if Autor.getSiblings()?has_content && Autor.getSiblings()[0].getData() != ""> 
75							<section class="autors clean-padding col-md-12 col-sm-12 col-xs-12"> 
76						        <#list Autor.getSiblings() as autor> 
77									<div class="autors-content"> 
78										<div class="autor">								 
79											<#if autor.Descripcio_Autor.getData()?has_content> 
80												${autor.getData()}&#44; ${autor.Descripcio_Autor.getData()} 
81											<#else> 
82												${autor.getData()} 
83											</#if>											 
84										</div> 
85									</div> 
86								</#list> 
87							</section> 
88				        </#if> 
89 
90						<#if DOCUMENT.getData()?has_content > 
91					        <section class="clean-padding col-md-12 col-sm-12 col-xs-12">                 
92								<div class="last-downloads"> 
93					     			<#assign classFile=getButtonStyles(DOCUMENT.getData())> 
94									<#assign targetFile="target=\"_blank\""/>         
95						 			<a ${targetFile} href="${DOCUMENT.getData()}" title="${TITLE.getData()}" class="btn btn-download pushtag-download"> 
96						  				<div class="text"><@liferay.language key="observatoriosocial-download"/></div>         
97						  				<div class="icon fa fa-2x ${classFile}"></div> 
98						   			</a> 
99					   			</div> 
100					         </section>         
101					    </#if>	 
102				         
103				       <#-- PREVIEW --> 
104				       <#if RESUM_PREVI??> 
105				      	<#if getterUtil.getBoolean(RESUM_PREVI.getData())>   							 
106				      		<div class="previ"> 
107					   			<h1 class="titol-previ"> 
108						       	 ${RESUM_PREVI.get("SUBTITULO_PUNTOS_CLAVE").getData()}  
109								</h1> 
110						        				         
111								<div class="microresum-previ"> 
112									${RESUM_PREVI.get("MICRORESUMEN_PUNTOS_CLAVE").getData()}  
113								</div> 
114						         
115								<div class="puntsclau-previ"> 
116						        	<@liferay.language key="observatoriosocial.puntos.clave"/> 
117						        </div>					      				       		 
118						       	<#assign style="col-md-12 col-sm-12 col-xs-12 row"> 
119						        <#if RESUM_PREVI.get("PUNTO_CLAVE_IZQ")?has_content && RESUM_PREVI.get("PUNTO_CLAVE_DER")?has_content> 
120						       	 	<#assign style="col-md-6 col-sm-6 col-xs-12 row"> 
121						       	</#if> 
122						       	<#assign i=1>						       		 	 
123								<#if RESUM_PREVI.get("PUNTO_CLAVE_IZQ")?has_content> 
124								    <ul class="${style}"> 
125								         
126								    <#list RESUM_PREVI.get("PUNTO_CLAVE_IZQ").getSiblings() as izq > 
127								       <li>							        			 
128											<div class="numberCircle">${i}</div>&nbsp;&nbsp; 
129							      			${izq.getData()} 
130							      		</li> 
131							        	<#assign i=i+1> 
132								    </#list> 
133								    </ul> 
134								</#if> 
135								<#if RESUM_PREVI.get("PUNTO_CLAVE_DER")?has_content> 
136								    <ul class="col-md-6 col-sm-6 col-xs-12 row">								         
137								       <#list RESUM_PREVI.get("PUNTO_CLAVE_DER").getSiblings() as der > 
138									        <li>							        			 
139							        			<div class="numberCircle">${i}</div>&nbsp;&nbsp; 
140							        			${der.getData()} 
141							        		</li> 
142							        		 <#assign i=i+1> 
143								        </#list> 
144								    </ul> 
145								</#if>								   
146								<#if RESUM_PREVI.get("TITULO_GRAFICO_ITEM_PREVI")?has_content> 
147								   <#list RESUM_PREVI.get("TITULO_GRAFICO_ITEM_PREVI").getSiblings() as resum > 
148										<div class="col-md-12 col-sm-12 col-xs-12 resum-previ"> 
149									    	<#if resum.get("GRAFICO_ITEM_PREVI").getData()?has_content> 
150									    		<div class="resum-previ-text"> 
151										       		<div class="titol-resum">${resum.getData()}</div>						        		 
152										       	</div>								        
153										       	<div class="resum-previ-imatge"> 
154										       		<img src="${resum.get("GRAFICO_ITEM_PREVI").getData()}" alt="${resum.getData()}"/> 
155										       	</div>								       						        	 
156										       	<div class="text-resum"> 
157										       		${resum.get("TEXTO_GRAFICO_ITEM_PREVI").getData()} 
158										       	</div>	 
159									    	<#else> 
160									    		<div class="resum-previ-text"> 
161									        		<div class="titol-resum">${resum.getData()}</div> 
162									        	</div> 
163									        	<div class="text-resum"> 
164									        		${resum.get("TEXTO_GRAFICO_ITEM_PREVI").getData()} 
165									        	</div>	 
166									    	</#if> 
167									    </div>	 
168									</#list> 
169								</#if> 
170							</div>										         
171							<#-- TODO:: RESTA de camps de previ -->					         
172				    	</article> 
173					</section> 
174			         
175			    	<#--  INICI BOTONS VEURE TOT i VEURE RESUM  --> 
176			    	<#assign mostrarBoton = languageUtil.get(locale, "veure-tot")>		    	 
177			    	<#assign ocultarBoton = languageUtil.get(locale, "veure-resum-previ")>			    	 
178			    	 
179			    	<#if RESUM_PREVI_TEXT_BOTO_MOSTRAR??>			    		 
180				    	<#if RESUM_PREVI_TEXT_BOTO_MOSTRAR.getData()?has_content> 
181				    		<#assign mostrarBoton =	RESUM_PREVI_TEXT_BOTO_MOSTRAR.getData()> 
182				    	</#if> 
183			    	</#if> 
184			    				    			    	 
185			    	<#if RESUM_PREVI_TEXT_BOTO_OCULTAR??> 
186				    	<#if RESUM_PREVI_TEXT_BOTO_OCULTAR.getData()?has_content> 
187				    		<#assign ocultarBoton =	RESUM_PREVI_TEXT_BOTO_OCULTAR.getData()> 
188				    	</#if>		    				    	 
189				    </#if>		    				    	 
190			    	 
191					<div class="veure-tot-botons">  
192				    	<span class="boto-veure-tot" id="boto-veure-tot-header"> 
193							<a id="veure-tot-header" title="${mostrarBoton}" href="#"> 
194								${mostrarBoton} 
195							</a> 
196						</span> 
197						<span class="boto-resum-previ" id="boto-resum-previ-header"> 
198							<a id="veure-resum-previ-header" title="${ocultarBoton}" href="#"> 
199								${ocultarBoton} 
200							</a>							 
201						</span>						 
202					</div> 
203					<#--  FI BOTONS VEURE TOT i VEURE RESUM  --> 
204					<#assign display="display:none;"> 
205			</#if> 
206			</#if>	 	  
207			 
208			     
209			 
210		   <div id="article-total" style="display:none;">     
211		   <#-- - END PREVIEW -->  
212				<#assign i = 0> 
213				<#list TITLE.getSiblings() as item > 
214					<#if item.TYPE.getData() == "1" >  
215						<section class="row article" ><!-- reports --> 
216							<article class="scroll-nav__section" id="section${item.ORDER.getData()}"><!-- col-md-6 col-xs-12 --> 
217								<#if item.getData()?has_content > 
218									<#if i == 0> 
219										<h1 class="col-md-12 col-sm-12 main-h1">${item.getData()}</h1> 
220									<#else> 
221										<h1 class="col-md-12 col-sm-12 main-h1">${item.ORDER.getData()}. ${item.getData()}</h1> 
222									</#if> 
223								</#if>							 
224								<#list item.SUBTITLE.getSiblings() as subitem > 
225									<#if subitem.getData()?has_content> 
226										<h2 class="col-md-12 col-sm-12 col-xs-12">${subitem.getData()}</h2> 
227									</#if> 
228									<div class="article-contents col-md-12 col-sm-12 col-xs-12 row"> 
229										<!-- bloque 1 --> 
230										<#if subitem.IMAGE.getData()?has_content > 
231											<div class="col-md-12 col-sm-12 col-xs-12 row"> 
232												<img src="${subitem.IMAGE.getData()}" class="img-responsive image-1-columna" alt="${subitem.getData()}"/>  
233											</div> 
234										</#if> 
235										<#if subitem.CITE.getData()?has_content> 
236											<div class="col-md-12 col-sm-12 col-xs-12 row"> 
237												<cite class="col-md-12 col-sm-12 col-xs-12 cita-1-columna">${subitem.CITE.getData()}</cite> 
238											</div> 
239										</#if> 
240										<#if subitem.CONTENT.getData()?has_content> 
241											<div class="col-md-12 col-sm-12 col-xs-12 row"><p>${subitem.CONTENT.getData()}</p></div> 
242										</#if> 
243										<#if subitem.VIDEO.getData()?has_content> 
244											<div class="col-md-12 col-sm-12 col-xs-12 row"><p>${subitem.VIDEO.getData()}</p></div> 
245										</#if> 
246									</div> 
247								</#list>	 
248							</article><!-- /col-md-6 col-xs-12 --> 
249						</section> 
250					<#elseif item.TYPE.getData()== "2" > 
251						<section class="row article" ><!-- reports --> 
252							<article class="scroll-nav__section three-columns" id="section${item.ORDER.getData()}"><!-- col-md-6 col-xs-12 --> 
253								<h1 class="col-md-12 col-sm-12 main-h1">${item.ORDER.getData()}. ${item.getData()}</h1> 
254								<div class="article-contents col-md-12 col-sm-12 col-xs-12 row"> 
255									<div class="row col-md-12 col-sm-12 col-xs-12"> 
256										<#list item.SUBTITLE.getSiblings() as subitem> 
257											<div class="col-md-4 col-sm-4 col-xs-12"><!-- col-md-4 col-xs-12 --> 
258												<#if subitem.IMAGE.getData()?has_content> 
259													<img src="${subitem.IMAGE.getData()}" class="img-responsive" alt="${subitem.getData()}"/> 
260												</#if>	 
261												<#if subitem.SUBTITLE.getData()?has_content > 
262													<h2 class="header">${subitem.SUBTITLE.getData()}</h2>	 
263												</#if> 
264												<#if subitem.CONTENT.getData()?has_content > 
265													<div class="summary"><p>${subitem.CONTENT.getData()}</p></div> 
266												</#if>	 
267												<#if subitem.CITE.getData()?has_content > 
268													<cite class="cite">${subitem.CITE.getData()}</cite> 
269												</#if> 
270												<#if subitem.VIDEO.getData()?has_content > 
271													<div class="video">${subitem.VIDEO.getData()}</div> 
272												</#if> 
273											</div><!-- /col-md-4 col-xs-12 -->	 
274										</#list> 
275									</div>  
276								</div> 
277							</article> 
278						</section>					 
279					</#if> 
280					<#assign i = i+1>  
281				</#list> 
282								 		 
283				 <#if (PeuPagina.getSiblings()?size > 1) > 
284					<section class="row article peu-pagina" ><!-- reports --> 
285						<article class="scroll-nav__section" id=""><!-- col-md-6 col-xs-12 --> 
286							<#list PeuPagina.getSiblings() as cur_PeuPagina> 
287								<div class="peu-content"> 
288									<#if cur_PeuPagina.get("Num")?has_content >  
289										<p id='${cur_PeuPagina.get("Num").getData()}' class="num-peu"> 
290											${cur_PeuPagina.get("Num").getData()}. ${cur_PeuPagina.getData()} 
291											<a href="#ancora-#${cur_PeuPagina.get("Num").getData()}" class="tornar-ancora">&crarr;</a> 
292										</p> 
293									</#if> 
294								</div>	 
295							</#list> 
296						</article> 
297					</section> 
298				</#if> 
299			</div> 
300			<#if RESUM_PREVI??> 
301			<#if getterUtil.getBoolean(RESUM_PREVI.getData())>   
302				<div class="veure-tot-botons">				     
303					<span class="boto-resum-previ" id="boto-resum-previ-footer"> 
304						<a id="veure-resum-previ-footer" title="${ocultarBoton}" href="#"> 
305							${ocultarBoton} 
306						</a>						 
307					</span>						 
308				</div> 
309			</#if> 
310			</#if> 
311						 
312		</div> 
313 
314<#-- columna derecha -->			     
315<div class="col-md-3 col-sm-12 col-xs-12 columna-dreta">	 
316	<section class="row article" >			 
317	<div class="index-and-title titol-relateds"> <p class="category"><@liferay.language key="observatoriosocial.clasificacion"/> </p> </div> 
318 
319 
320	<#-- Autores -->	 
321	<#if TITULO_AUTORES_COL_DER.getData()?has_content >				 
322		<h2 class="main-h2">${TITULO_AUTORES_COL_DER.getData()}</h2> 
323 
324	<#if Autor.getSiblings()?has_content>		 
325		<#list Autor.getSiblings() as autor>			 
326			<div class="autors-content"> 
327				<div class="autor">								 
328					<#if autor.Descripcio_Autor.getData()?has_content> 
329						${autor.getData()} , ${autor.Descripcio_Autor.getData()} 
330					<#else> 
331						${autor.getData()} 
332					</#if> 
333				</div> 
334				<#if autor.Twitter.getData()?has_content>						 
335					<div class="twitter-autor"> 
336						<a class="fa fa-twitter" target="_blank" href="https://twitter.com/${autor.Twitter.getData()}" title="Twitter &#64;${autor.Twitter.getData()}">&#64;${autor.Twitter.getData()}</a> 
337					</div> 
338				</#if> 
339			</div>	 
340		</#list>				 
341	</#if>	 
342	</#if> 
343 
344	<#-- Clasificacion --> 
345	<h2 class="main-h2"><@liferay.language key="observatoriosocial.tags"/></h2> 
346		<div class="tags-content"> 
347		<#assign categoriesTags = [] /> 
348		<#assign categoriesTagsId = [] /> 
349 
350			<#list categories as category > 
351				<#assign vocabularyId = propsUtil.get("vocabulary.tags") /> 
352				<#if category.getVocabularyId() == vocabularyId?number> 
353					<#assign categoriesTags = categoriesTags + [category]>     
354					<#assign categoriesTagsId = categoriesTagsId + [category.getCategoryId()]>                  
355				</#if> 
356			</#list>  
357			 
358			<#assign i=0> 
359			<#list categoriesTags as category> 
360				<#assign enllacCategory="">					 
361				<#assign layoutCategoria = layoutLocalService.fetchLayoutByFriendlyURL(themeDisplay.getSiteGroupId(), false, "/busca-por-tag")>	 
362				<#assign enllacCategory = portalUtil.getLayoutFullURL(layoutCategoria, themeDisplay)+"?p_p_id=3&_3_struts_action=%2Fsearch%2Fsearch&_3_keywords=%22"+category.getTitle(locale)+"%22&categories="+category.getCategoryId()>					 
363				<#if i==(categoriesTags?size-1)>					 
364					<a href="${enllacCategory}" title="${category.getTitle(locale)}" >${category.getTitle(locale)}</a>					  
365				<#else> 
366					<a href="${enllacCategory}" title="${category.getTitle(locale)}" >${category.getTitle(locale)}</a>&#44; 
367				</#if> 
368				<#assign i=i+1> 
369			</#list>	 
370		</div> 
371 
372 
373		<#-- Tematicas -->	 
374		<h2 class="main-h2"><@liferay.language key="observatoriosocial.thematic"/></h2> 
375		<div class="tags-content">		 							 			 			 			 	 
376			<#assign categoriesThematics = [] /> 
377						 
378			<#list categories as category > 
379				<#if category.getVocabularyId() == vocabularyIdTemaP || category.getVocabularyId() == vocabularyIdTemaS> 
380					<#assign categoriesThematics = categoriesThematics + [category]>                    
381				</#if> 
382			</#list>  
383			 
384			<#assign i=0> 
385			<#list categoriesThematics as category> 
386				<#assign enllacCategory=""> 
387				<#assign assetCategoryProperty = assetCategoryPropertyLocalService.getCategoryProperty(category.getCategoryId(), "layout")/> 
388				<#assign layoutCategoria = layoutLocalService.fetchLayoutByFriendlyURL(themeDisplay.getSiteGroupId(), false, "/"+assetCategoryProperty.getValue())>	 
389				<#assign enllacCategory = portalUtil.getLayoutFullURL(layoutCategoria, themeDisplay)>					 
390 
391				<#if i==(categoriesThematics?size-1)>					 
392					<a href="${enllacCategory}" title="${category.getTitle(locale)}" >${category.getTitle(locale)}</a>					  
393				<#else> 
394					<a href="${enllacCategory}" title="${category.getTitle(locale)}" >${category.getTitle(locale)}</a>&#44; 
395				</#if> 
396				<#assign i=i+1> 
397			</#list>	 
398		</div>  
399	</section> 
400	 
401	<#-- documents --> 
402	<#if RELATED_DOCUMENTS.getData()?has_content> 
403		<section class="row article" >	 
404			<div class="index-and-title titol-relateds">  
405				<p class="category"> <@liferay.language key="observatoriosocial.related.documents"/> </p>  
406			</div>				 
407			<ul class="related-documents-content"> 
408			<#list RELATED_DOCUMENTS.getSiblings() as cur_RELATED_DOCUMENTS> 
409				<li class="related-document"> 
410					<a href="${cur_RELATED_DOCUMENTS.getData()}" target="_blank" > 
411						${cur_RELATED_DOCUMENTS.get("TITLE_DOC").getData()} 
412					</a> 
413				</li> 
414			</#list> 
415			</ul> 
416		</section>					 
417	</#if>		 
418 
419 
420<#-- Contenidos relacionados --> 
421<#assign assetEntryQuery = objectUtil('com.liferay.portlet.asset.service.persistence.AssetEntryQuery')>	 
422<#assign search = assetEntryQuery.setExcludeZeroViewCount(false) >			 
423<#assign search = assetEntryQuery.setOrderByCol1("priority")> 
424<#assign search = assetEntryQuery.setOrderByType1("ASC")> 
425<#assign search = assetEntryQuery.setOrderByCol2("publishDate")> 
426<#assign search = assetEntryQuery.setOrderByType2("DESC")> 
427<#assign search = assetEntryQuery.setStart(0)> 
428<#assign search = assetEntryQuery.setEnd( MAX_RELATED_ART.getData()?number + 1)> 
429 
430<#assign newAssetRelatedCategoryIds = [] /> 
431<#list categoriesTags as category >					 
432	<#assign newAssetRelatedCategoryIds = newAssetRelatedCategoryIds + [category.getCategoryId()]>   
433</#list> 
434 
435<#assign search = assetEntryQuery.setAnyCategoryIds(newAssetRelatedCategoryIds)> 
436 
437<#assign newAllAssetRelatedCategoryIds = [] /> 
438<#assign search = assetEntryQuery.setAllCategoryIds(newAllAssetRelatedCategoryIds)> 
439 
440<#assign previewAuxRelatedIds = assetEntryQuery.getNotAnyCategoryIds()> 
441<#--Quitamos la tipologia "Seccio"--> 
442 
443<#assign newNotAllAssetRelatedCategoryIds = vocabularyIdTipoContenidoCategoryE?split(",")> 
444<#assign previewAuxRelatedIds = previewAuxRelatedIds + [newNotAllAssetRelatedCategoryIds[0]?number]> 
445 
446<#-- filtre -->			 
447<#if !themeDisplay.isSignedIn()>		 
448    <#assign categoriesPreview = [] /> 
449    <#assign assetCategory = staticUtil["com.liferay.portal.kernel.util.ClassResolverUtil"].resolveByPortalClassLoader("com.liferay.portlet.asset.model.AssetCategoryModel") /> 
450    <#assign queryPreview = staticUtil["com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil"].forClass(assetCategory) />			 
451    <#assign VOID = queryPreview.add(staticUtil["com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil"].eq("name", "Preview")) />		 
452    <#assign categoriesPreview = staticUtil["com.liferay.portal.service.UserLocalServiceUtil"].dynamicQuery(queryPreview, 0, 1)> 
453     
454     <#assign categoriaPreviewId = categoriesPreview[0].getCategoryId()> 
455     <#assign previewAuxRelatedIds = previewAuxRelatedIds + [categoriaPreviewId]> 
456     
457</#if> 
458 
459<#assign search = assetEntryQuery.setNotAnyCategoryIds(previewAuxRelatedIds)> 
460 
461<#assign resultsRelateds = assetEntryQueryService.getEntries(assetEntryQuery) > 
462 
463<#-- exclude own article, if is not excluded we will exclude the last one --> 
464<#assign excluido = "false" />  
465 
466<#assign resultsRelatedsArray =[]> 
467					 
468<#list resultsRelateds as resultsRelatedsList>			 
469	<#if resultsRelatedsList.getEntryId() != entry.getEntryId()>					 
470		<#assign resultsRelatedsArray = resultsRelatedsArray + [resultsRelatedsList]> 
471	<#else> 
472		<#assign excluido = "true" />  
473	</#if> 
474</#list> 
475 
476 
477<#assign exit = 0> 
478<#if resultsRelatedsArray?has_content> 
479	<section class="row article" > 
480		<div class="index-and-title titol-relateds">  
481		<p class="category"> <@liferay.language key="observatoriosocial.related.contents"/>	</p>  
482		</div> 
483		<#list resultsRelatedsArray as x> 
484			<#assign assetRenderer = x.getAssetRenderer() >	 
485			<#assign journalArticle = assetRenderer.getArticle() /> 
486			<#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) /> 
487			<#assign rootElement = document.getRootElement() /> 
488			<#assign friendlyURL = ""> 
489			<#assign viewURLRelated = ""> 
490			<#assign otro = ""> 
491				 
492			<#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) /> 
493			 
494			 
495			<#list rootElement.elements() as dynamicElement> 
496				<#if "Titulo" == dynamicElement.attributeValue("name")> 
497					<#assign entryTitle = dynamicElement.element("dynamic-content").getText() /> 
498				</#if> 
499				<#if "FRIENDLY_URL" == dynamicElement.attributeValue("name")> 
500					<#assign friendlyURL = htmlUtil.escape(dynamicElement.element("dynamic-content").getText()) />							 
501				</#if> 
502				<#if "YEAR" == dynamicElement.attributeValue("name")> 
503					<#assign year = dynamicElement.element("dynamic-content").getText() /> 
504				</#if> 
505				<#if "MONTH" == dynamicElement.attributeValue("name")> 
506					<#assign month = dynamicElement.element("dynamic-content").getText() /> 
507				</#if> 
508				<#if "GENERALCONTENT" == dynamicElement.attributeValue("name")> 
509					<#assign content = dynamicElement.element("dynamic-content").getText() /> 
510				</#if>	 
511				<#if "Otro_Enlace" == dynamicElement.attributeValue("name")> 
512					<#assign otro = dynamicElement.element("dynamic-content").getText() />			                           
513				</#if>							 
514																 
515			</#list>					 
516			 
517			<#assign viewURLRelated = getViewURL(friendlyURL, assetRenderer.getUrlTitle())>					 
518					 
519			<div class="related-article"> 
520				<div class="index-and-title"> 
521					 <#list x.getCategories() as category >												 
522						<#if category.getVocabularyId() == vocabularyIdTipoC> 
523							${category.getTitle(locale)}               
524						</#if> 
525					</#list> 
526				</div> 
527						 
528				<a href="${viewURLRelated}" title="${entryTitle}" class="pushtag">					  
529					<p class="title">${entryTitle}</p> 
530				</a> 
531				<#if month?has_content && year?has_content> 
532					<span class="posted-on">						 
533						<time datetime="${month} ${year}" >${month} ${year}</time> 
534					</span> 
535				</#if>    
536				<#if content?has_content > 
537					<div class="summary"><p>${content}</p></div> 
538				</#if> 
539			</div> 
540			<#assign exit = exit + 1> 
541				<#if exit==5> 
542			<#break> 
543			</#if>			 
544		</#list> 
545</#if> 
546</section> 
547<section class="row article"></section>	 
548</div> 
549 
550<#-- Tambien te puede interesar --> 
551<#assign assetEntryQuery2 = objectUtil('com.liferay.portlet.asset.service.persistence.AssetEntryQuery')>				 
552<#assign search = assetEntryQuery2.setExcludeZeroViewCount(false) > 
553<#-- Ordenamos los resultados por el campo "prioridad" ascendente--> 
554<#assign search = assetEntryQuery2.setOrderByCol1("priority") > 
555<#assign search = assetEntryQuery2.setOrderByType1("ASC") > 
556<#-- Ordenamos los resultados por el campo "fecha de publicación" descendente--> 
557<#assign search = assetEntryQuery2.setOrderByCol2("publishDate") > 
558<#assign search = assetEntryQuery2.setOrderByType2("DESC") > 
559<#assign search = assetEntryQuery2.setStart(0) > 
560<#assign search = assetEntryQuery2.setEnd(10)> 
561 
562<#assign newAllAssetInterestingCategoryIds = []> 
563<#list categoriesPrincipal as p > 
564    <#assign newAllAssetInterestingCategoryIds = newAllAssetInterestingCategoryIds + [p.getCategoryId()] > 
565</#list> 
566 
567<#list categoriesSecundaria as s > 
568    <#assign newAllAssetInterestingCategoryIds = newAllAssetInterestingCategoryIds + [s.getCategoryId()] > 
569</#list> 
570 
571 
572<#assign search = assetEntryQuery2.setAllCategoryIds(newAllAssetInterestingCategoryIds)> 
573 
574<#assign previewAuxInterestingIds = assetEntryQuery2.getNotAnyCategoryIds()> 
575<#--Quitamos la tipologia "Seccio"--> 
576 
577<#assign newNotAllAssetInterestingCategoryIds = vocabularyIdTipoContenidoCategoryE?split(",")> 
578<#assign previewAuxInterestingIds = previewAuxInterestingIds + [newNotAllAssetInterestingCategoryIds[0]?number]> 
579 
580<#-- filtre -->			 
581<#if !themeDisplay.isSignedIn()>		 
582    <#assign categoriesPreview = [] /> 
583    <#assign assetCategory = staticUtil["com.liferay.portal.kernel.util.ClassResolverUtil"].resolveByPortalClassLoader("com.liferay.portlet.asset.model.AssetCategoryModel") /> 
584    <#assign queryPreview = staticUtil["com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil"].forClass(assetCategory) />			 
585    <#assign VOID = queryPreview.add(staticUtil["com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil"].eq("name", "Preview")) />		 
586    <#assign categoriesPreview = staticUtil["com.liferay.portal.service.UserLocalServiceUtil"].dynamicQuery(queryPreview, 0, 1)> 
587     
588     <#assign categoriaPreviewId = categoriesPreview[0].getCategoryId()> 
589     <#assign previewAuxInterestingIds = previewAuxInterestingIds + [categoriaPreviewId]> 
590     
591</#if> 
592 
593<#assign search = assetEntryQuery2.setNotAnyCategoryIds(previewAuxInterestingIds)> 
594 
595<#assign resultsInteresting = assetEntryQueryService.getEntries(assetEntryQuery2) > 
596 
597<#assign resultsInterestingArray = []> 
598 
599<#list resultsInteresting as resultsInterestingList> 
600   <#if resultsInterestingList.getEntryId() != entry.getEntryId() > 							 
601	  <#assign resultsInterestingArray = resultsInterestingArray + [resultsInterestingList]>  
602   </#if> 
603</#list> 
604 
605<#if resultsInterestingArray?size<3 > 
606			 
607	<#assign newAllAssetInterestingCategoryIds2 = []>	 
608 
609	<#list categoriesPrincipal as p > 
610		<#assign newAllAssetInterestingCategoryIds2 =newAllAssetInterestingCategoryIds2 + [p.getCategoryId()] > 
611	</#list> 
612 
613	<#assign search = assetEntryQuery2.setAllCategoryIds(newAllAssetInterestingCategoryIds2) > 
614	 
615	<#assign resultsInteresting2 = assetEntryQueryService.getEntries(assetEntryQuery2) >	 
616	 
617	<#list resultsInteresting2 as lista> 
618		<#assign val = resultsInterestingArray?seq_contains(lista)?string("y", "n")>		 
619		<#if lista.getEntryId() != entry.getEntryId() && val?contains("n")> 
620			<#assign resultsInterestingArray = resultsInterestingArray + [lista]>  
621		</#if>	 
622	</#list>	 
623	 
624</#if> 
625 
626<#if resultsInterestingArray?has_content>	 
627<section class="col-md-12 col-sm-12 col-xs-12 row section-article-relateds" style="margin-top: 30px;"> 
628	<h1 class="main-h1"><@liferay.language key="observatoriosocial.interesting.contents"/></h1> 
629<section class="row summary_list_observatori">		 
630 
631<#assign exit = 0> 
632<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")/> 
633<#assign JA=JournalArticleLocalService.getArticle(getterUtil.getLong(groupId), getterUtil.getString(.vars['reserved-article-id'].data))/> 
634 
635 
636<#list resultsInterestingArray as x> 
637 
638	<#assign tituloInteresting  = "" > 
639	<#assign imagenInteresting  = "" > 
640	<#assign contentInteresting = "" > 
641	<#assign yearInteresting    = "" > 
642	<#assign monthInteresting   = "" > 
643	<#assign friendlyUrlInteresting   = "" >															 
644	<#assign otherlinkInteresting   = "" > 
645	<#assign otherlinkInterestingNodes = []> 
646	<#assign otherlinkInterestingOnClick   = "" > 
647	<#assign otro   = "" > 
648 
649	<#assign assetRenderer = x.getAssetRenderer() >						 
650	<#assign articleInteresting = assetRenderer.getArticle() /> 
651	<#assign document = saxReaderUtil.read(articleInteresting.getContentByLocale(locale)) /> 
652	 
653	<#assign rootElement = document.getRootElement() /> 
654	 
655	<#list rootElement.elements() as dynamicElement> 
656		<#if "Titulo" == dynamicElement.attributeValue("name")> 
657			<#assign tituloInteresting = htmlUtil.escape(dynamicElement.element("dynamic-content").getText()) /> 
658		</#if> 
659		<#if "GENERALIMAGE" == dynamicElement.attributeValue("name")> 
660			<#assign imagenInteresting = htmlUtil.escape(dynamicElement.element("dynamic-content").getText()) /> 
661		</#if> 
662		<#if "GENERALCONTENT" == dynamicElement.attributeValue("name")> 
663			<#assign contentInteresting = dynamicElement.element("dynamic-content").getText() /> 
664		</#if>			 
665		<#if "YEAR" == dynamicElement.attributeValue("name")> 
666			<#assign yearInteresting = htmlUtil.escape(dynamicElement.element("dynamic-content").getText()) /> 
667		</#if> 
668		<#if "MONTH" == dynamicElement.attributeValue("name")> 
669			<#assign monthInteresting = htmlUtil.escape(dynamicElement.element("dynamic-content").getText()) /> 
670		</#if> 
671		<#if "FRIENDLY_URL" == dynamicElement.attributeValue("name")>							 
672			<#assign friendlyUrlInteresting = htmlUtil.escape(dynamicElement.element("dynamic-content").getText()) />							 
673		</#if>   
674		 
675		<#if "DOCUMENT" == dynamicElement.attributeValue("name")> 
676			<#assign documentInteresting = dynamicElement.element("dynamic-content").getText() /> 
677		</#if>	 
678		<#if "Otro_Enlace" == dynamicElement.attributeValue("name")> 
679			<#assign otro = dynamicElement.element("dynamic-content").getText() /> 
680			<#assign onclick = getSingleValue(otro,dynamicElement, "onclick") />                 
681		</#if>						 
682	</#list> 
683	 
684	<#assign viewURLInteresting = getViewURL(friendlyUrlInteresting, assetRenderer.getUrlTitle())> 
685   	<#if contentInteresting?has_content> 
686    <div class="col-md-4 col-sm-4 col-xs-12"> 
687		 
688		<#assign categoriesInteresting = x.getCategories() /> 
689		<#list categoriesInteresting as category >										   
690			<#if category.getVocabularyId() == vocabularyIdTipoC> 
691				<p class="category">${category.getTitle(locale)}</p>                 
692			</#if>							 
693		</#list>		 
694				 
695		<a href="${viewURLInteresting}" title="${tituloInteresting}" class="pushtag"> 
696			<img src="${imagenInteresting}" alt="${tituloInteresting}"/> 
697		</a> 
698 
699		<a href="${viewURLInteresting}" title="${tituloInteresting}" class="pushtag" > 
700			<h2 class="header">${tituloInteresting}</h2> 
701		</a> 
702						 
703	 
704	<div class="tags-and-date">					 
705		<#list categoriesInteresting as category >			 
706			<#if category.getVocabularyId() == vocabularyIdTemaP> 
707				<#assign enllacCategory=""> 
708				<#assign assetCategoryProperty = assetCategoryPropertyLocalService.getCategoryProperty(category.getCategoryId(), "layout")/> 
709				<#assign layoutCategoria = layoutLocalService.fetchLayoutByFriendlyURL(themeDisplay.getSiteGroupId(), false, "/"+assetCategoryProperty.getValue())>	 
710				<#assign enllacCategory = portalUtil.getLayoutFullURL(layoutCategoria, themeDisplay)>  
711				<span class="tags"> 
712					<a href="${enllacCategory}" title="${category.getTitle(locale)}" >${category.getTitle(locale)}</a> 
713				</span> 
714			</#if> 
715		</#list> 
716		 
717		<#list categoriesSecundaria as category> 
718			<#assign enllacCategory=""> 
719			<#assign assetCategoryProperty = assetCategoryPropertyLocalService.getCategoryProperty(category.getCategoryId(), "layout")/> 
720			<#assign layoutCategoria = layoutLocalService.fetchLayoutByFriendlyURL(themeDisplay.getSiteGroupId(), false, "/"+assetCategoryProperty.getValue())>	 
721			<#assign enllacCategory = portalUtil.getLayoutFullURL(layoutCategoria, themeDisplay)> 
722			<span class="tags"> 
723				<a href="${enllacCategory}" title="${category.getTitle(locale)}" >${category.getTitle(locale)}</a> 
724			</span>  
725		</#list>	 
726 
727		<#if monthInteresting?has_content && yearInteresting?has_content> 
728			<span class="posted-on">						 
729				<time datetime="${monthInteresting} ${yearInteresting}">${monthInteresting} ${yearInteresting}></time> 
730			</span> 
731		</#if> 
732	</div> 
733	<p class="summary">${contentInteresting}</p>		 
734	</div> 
735	<#assign exit = exit + 1> 
736   </#if> 
737   <#if exit==3> 
738	<#break> 
739   </#if> 
740</#list> 
741</section> 
742 
743</section> 
744</#if> 
745<div class="article-final"></div> 
746</div> 
747 
748<#function getViewURL friendlyURL urlTitle > 
749 
750	<#assign viewURLFinal = ""> 
751	 
752	<#if !(friendlyURL?contains("http") || friendlyURL?contains("https")) && friendlyURL != "">						 
753		<#assign viewURLFinal = "/" + friendlyURL >					 
754	<#elseif friendlyURL?contains("http") || friendlyURL?contains("https")>					 
755		<#assign viewURLFinal = friendlyURL > 
756	<#else>							 
757		<#assign viewURLFinal = urlTitle > 
758	</#if> 
759	 
760	<#return viewURLFinal> 
761	 
762</#function> 
763 
764<#function getAutor autor dynamicElement> 
765	<#assign autorComplete=""> 
766	<#if autor?has_content> 
767	    <#assign autorList = dynamicElement.selectNodes("dynamic-element[@name='Descripcio_Autor']") /> 
768		<#if (autorList?has_content) > 
769			<#if (autorList?size>0) > 
770				<#list autorList as curr_autor> 
771					<#assign descripcio_autor = curr_autor.selectNodes("dynamic-content")[0].getData() /> 
772				    <#if descripcio_autor?has_content> 
773				    	<#assign autorComplete =autorComplete + autor + "," + descripcio_autor + ";">			 
774					<#else> 
775						<#assign autorComplete =autorComplete + autor +";"> 
776					</#if> 
777				</#list> 
778			</#if> 
779		</#if> 
780	</#if>  
781	<#return autorComplete> 
782</#function> 
783 
784<#function getAssetLinksDossierNumber assetLinks> 
785	<#assign dossierNumber=""> 
786	<#list assetLinks as assetLinkAux > 
787        	<#assign assetEnryIdLinked = assetLinkAux.getEntryId2()> 
788			<#assign assetEntryLinked = assetEntryLocalService.getEntry(assetEnryIdLinked)> 
789			<#assign categoriesLink = assetEntryLinked.getCategories()> 
790			<#assign isDossier = "false"> 
791			 
792			<#list  categoriesLink as categoryLink >				 
793				<#assign dosierCategoryId = PropsUtil.get("categoria.dossier.id")?number> 
794				<#if categoryLink.getCategoryId()==dosierCategoryId > 
795					<#assign isDossier = "true" > 
796				</#if>				 
797			</#list> 
798			<#if isDossier=="true" > 
799				<#assign dossierNumber =getArticleFieldValue(assetEntryLinked,"NUMBER",locale.toString()) >				 
800			 </#if> 
801        </#list> 
802	<#return dossierNumber> 
803</#function> 
804 
805 
806<#function getAssetLinksDossierURL assetLinks> 
807	<#assign dossierUrl=""> 
808	<#list assetLinks as assetLinkAux > 
809        	<#assign assetEnryIdLinked = assetLinkAux.getEntryId2()> 
810			<#assign assetEntryLinked = assetEntryLocalService.getEntry(assetEnryIdLinked)> 
811			<#assign categoriesLink = assetEntryLinked.getCategories()> 
812			<#assign isDossier = "false"> 
813			 
814			<#list  categoriesLink as categoryLink >				 
815				<#assign dosierCategoryId = PropsUtil.get("categoria.dossier.id")?number> 
816				<#if categoryLink.getCategoryId()==dosierCategoryId > 
817					<#assign isDossier = "true" > 
818				</#if>				 
819			</#list> 
820			<#if isDossier=="true" >				 
821				<#assign dossierUrl = AssetPublisherHelperImpl.getAssetViewURL(liferayPortletRequest, liferayPortletResponse, assetEntryLinked, viewInContext) >			 </#if> 
822        </#list> 
823	<#return dossierUrl> 
824</#function> 
825 
826<#function getCategories categories vocabularyId> 
827	<#assign categoriesList = []> 
828	<#list categories as category > 
829		<#if category.getVocabularyId()== vocabularyId> 
830			<#assign categoriesList = categoriesList + [category]> 
831		</#if>  
832	</#list> 
833	<#return categoriesList /> 
834</#function> 
835 
836 
837<#function printDivSizeCol numElements> 
838	 <#if numElements?number%2 == 0> 
839		<#return "<div class='col-md-6 col-sm-6 col-xs-12'>">	 
840	<#else> 
841		<#return  "<div class='col-md-4 col-sm-4 col-xs-12'>"> 
842	</#if>  
843</#function> 
844 
845<#function printDivSizeCol2 numElements>	  
846	<#if numElements?has_content> 
847		<#if numElements?number == 1 || numElements?number == 0>   
848			<#return "<div class='col-md-7 col-sm-7 col-xs-12'>"> 
849		<#elseif numElements?number%6 == 0> 
850			<#return "<div class='col-md-4 col-sm-4 col-xs-12'>"> 
851		<#elseif numElements?number%2 == 0> 
852			<#return "<div class='col-md-6 col-sm-6 col-xs-12'>">	 
853		<#else> 
854			<#return "<div class='col-md-4 col-sm-4 col-xs-12'>"> 
855		</#if> 
856	<#else> 
857		<#return "<div class='col-md-7 col-sm-7 col-xs-12'>"> 
858	</#if> 
859</#function> 
860 
861<#function getStringValue2levels otro dynamicElement field1 field2 > 
862	<#assign res=""> 
863	<#if otro?has_content>	     
864	    <#assign res=dynamicElement.selectSingleNode("/root/dynamic-element[@name='" 
865	     + field1+ "']/dynamic-element[@name='"+field2+"']/dynamic-content")[0].getText() /> 
866	      
867	</#if>  
868	<#return res> 
869</#function> 
870 
871<#function getSingleValue element dynamicElement fieldname> 
872	<#assign res=""> 
873	<#if element?has_content> 
874	    <#assign elementList = dynamicElement.selectNodes("dynamic-element[@name='"+fieldname+"']") /> 
875		<#if (elementList?has_content) > 
876			<#if (elementList?size>0) > 
877				<#list elementList as curr_element> 
878					<#assign cur_value = curr_element.selectNodes("dynamic-content")[0].getData() /> 
879				    <#if cur_value?has_content> 
880				    	<#assign res =res + cur_value>			 
881					</#if> 
882				</#list> 
883			</#if> 
884		</#if> 
885	</#if>  
886	<#return res> 
887</#function> 
888 
889 
890<#function getNumberValue3levels dynamicElement field1 field2 field3> 
891	<#assign res=0> 
892	<#if dynamicElement?has_content>	     
893	    <#assign res=dynamicElement.selectSingleNode("/root/dynamic-element[@name='" 
894	     + field1+ "']/dynamic-element[@name='"+field2+"']/dynamic-element[@name='"+field3+"']/dynamic-content").getText() />			 
895	</#if>  
896	<#return res?number> 
897</#function> 
898 
899<#function getButtonStyles document> 
900	<#assign classFile="fa-file-o"> 
901	<#if document?contains(".pdf")> 
902		<#assign classFile="fa-file-pdf-o"/>					     
903	<#elseif document?contains(".xls") || document?contains(".xlsx")> 
904		<#assign classFile="fa-file-excel-o"/>					     
905	<#elseif document?contains(".doc") || document?contains(".docx")> 
906		<#assign classFile="fa-file-word-o"/>					  
907	</#if>	 
908	<#return classFile> 
909</#function> 
910 
911<script type="text/javascript"> 
912	$( document ).ready(function() { 
913	 
914			$("#boto-resum-previ-footer").hide(); 
915			$("#boto-resum-previ-header").hide(); 
916			$("#scroll-nav").hide(); 
917			$("#article-total").show(); 
918			<#if RESUM_PREVI??> 
919			<#if getterUtil.getBoolean(RESUM_PREVI.getData())> 
920				$("#article-total").hide();				 
921			<#else> 
922				$("#article-total").show(); 
923				$("#scroll-nav").show(); 
924			</#if> 
925			</#if>		 
926			 
927									 
928			$("#veure-tot-header").click(function(event) { 
929			$("#boto-resum-previ-footer").show(); 
930			$("#boto-veure-tot-header").hide(); 
931			$("#boto-resum-previ-header").show(); 
932			$("#article-total").show(); 
933			$("#scroll-nav").show();									 
934			scrollNav(); 
935			event.preventDefault(); 
936		}); 
937									 
938		$("#veure-resum-previ-header").click(function(event) { 
939			$("#boto-resum-previ-footer").hide(); 
940			$("#boto-veure-tot-header").show(); 
941			$("#boto-resum-previ-header").hide(); 
942			$("#article-total").hide(); 
943			$("#scroll-nav").hide();											 
944			event.preventDefault(); 
945		}); 
946									 
947		$("#veure-resum-previ-footer").click(function(event) { 
948			$("#boto-veure-tot-header").show(); 
949			$("#boto-resum-previ-header").hide(); 
950			$("#boto-resum-previ-footer").hide();									 
951			$("#article-total").hide(); 
952			$("#scroll-nav").hide(); 
953			$(window).scrollTop(0); 
954			event.preventDefault(); 
955		}); 
956	 
957		$('.cos-article a[href^="#"]').each(function() { 
958			  $(this).addClass( "ancora" ); 
959			  $(this).attr("id","ancora-"+$(this).attr("href")); 
960		}); 
961		 
962		$(".tornar-ancora").click(function(event){ 
963			var idElement = $(this).attr("href"); 
964			$('.ancora').each(function() { 
965				if(idElement == "#"+$(this).attr("id")){ 
966					 $('html, body').animate({ 
967					        scrollTop: $(this).offset().top-80 
968					    }, 500); 
969
970			}); 
971			event.preventDefault(); 
972		});	 
973	}); 
974</script>