Errorea gertatu da txantiloia prozesatzerakoan.
Range start index 156 is out of bounds, because the sliced sequence has only 153 element(s). (Note that indices are 0-based).
The blamed expression:
==> begin..(totalEle-one)  [in template "842907#842945#5675675" at line 435, column 46]

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign finalEntries = finalEntries[b...  [in template "842907#842945#5675675" at line 435, column 9]
----
1<#--FTL de funciones genericas--> 
2<#assign funcionesCustomId = layout.getGroup().getExpandoBridge().getAttribute("iybg-ftl-funciones")> 
3<#include "${templatesPath}/${funcionesCustomId}"> 
4 
5<#-- Servicios --> 
6<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
7<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
8<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")/> 
9<#assign searcher = serviceLocator.findService("net.juventud.buscador.categorias.service.SearchService")> 
10<#assign assetCategoryPropertyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") /> 
11<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") > 
12<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
13<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
14 
15<#assign zero = getterUtil.getInteger("0")> 
16<#assign one = getterUtil.getInteger("1")> 
17<#assign currentPag = one> 
18<#assign delta = getterUtil.getLong("12")> 
19<#assign numElemFila = getterUtil.getLong("3")> 
20<#assign maxDescLength = getterUtil.getLong("200")> 
21<#assign group = groupLocalService.getGroup(groupId)/> 
22<#assign groupFriendlyURL = group.getFriendlyURL() /> 
23<#assign renderURL = themeDisplay.getURLCurrent()> 
24<#assign params = renderURL?split("&")> 
25<#assign categoriesId = ""> 
26<#assign filtro = ""> 
27<#assign urlEncoder = staticUtil["java.net.URLEncoder"]> 
28<#assign completeCurrentRedirecUrl = urlEncoder.encode(themeDisplay.getPortalURL() + renderURL,"UTF-8")> 
29	<#assign temaseleccionado="" > 
30	<#assign comarcaseleccionada="" > 
31	<#assign texto="" > 
32	<#assign comarcaTodasCategoryId = themeDisplay.getThemeSetting("comarca_todas_categoryId")> 
33 
34<#list params as param> 
35 
36        <#assign paramLength = getterUtil.getInteger(param?length)> 
37        <#assign equalsIndex = zero> 
38		 
39        <#if param?index_of("=") != -1> 
40		      <#assign equalsIndex =  getterUtil.getInteger(param?index_of("="))> 
41 
42			<#if param?index_of("zx=") != -1> 
43			  <#assign currentzx = getterUtil.getLong(param[equalsIndex..(paramLength-1)])> 
44			  <#assign renderURL = renderURL?replace("zx=", "")> 
45			  <#assign oldParam = "zx=" + currentzx> 
46			  <#assign renderURL = renderURL?replace(oldParam, "")> 
47			</#if> 
48            <#assign equalsIndex =  equalsIndex + one> 
49        </#if> 
50 
51        <#if param?contains("categoryId")> 
52            <#assign replaceCategories = param?substring(equalsIndex,paramLength)> 
53            <#assign categoriesId =replaceCategories?replace("%2C", ",")> 
54 
55        </#if> 
56        <#if param?contains("page")> 
57            <#assign currentPag = getterUtil.getLong(param[equalsIndex..(paramLength-1)])> 
58            <#assign oldParam = "&page=" + currentPag> 
59            <#assign renderURL = renderURL?replace(oldParam, "")> 
60            <#assign oldParam = "?page=" + currentPag> 
61            <#assign renderURL = renderURL?replace(oldParam, "")> 
62        </#if> 
63        <#if param?contains("conv")> 
64            <#assign filtro = "conv"> 
65            <#assign oldParam = "&conv"> 
66            <#assign renderURL = renderURL?replace(oldParam, "")> 
67            <#assign oldParam = "?conv"> 
68            <#assign renderURL = renderURL?replace(oldParam, "")>             
69        </#if>     
70 
71</#list> 
72 
73 
74<#if (categoriesId?split(",")?size > 1)> 
75	<#assign temaseleccionado=categoriesId?split(",")[0] > 
76	<#assign comarcasCategory=categoriesId?split(",")[1] > 
77	 
78 
79	 
80		 
81		<#if !validator.equals("", temaseleccionado?trim)>	<#-- SE SELECCIONADO TEMA--> 
82			<#if !validator.equals("", comarcasCategory?trim)><#-- SE SELECCIONADO COMARCA--> 
83 
84			<#assign comarcaseleccionada="1" /> 
85			<#assign categorias = temaseleccionado + "," + comarcasCategory> 
86			<#assign categoriastodascomarcas = temaseleccionado + "," + comarcaTodasCategoryId> 
87				<#if searcher?exists>				 
88					<#assign finalEntries1 = searcher.searchContents(entries, categorias, null, filtro)> 
89					<#assign finalEntries2 = searcher.searchContents(entries, categoriastodascomarcas, null, filtro)> 
90	 
91					<#assign finalEntries1Ordered = []/>					 
92					<#assign finalEntries2Ordered = []/> 
93					<#assign listaNueva =[]/> 
94					<#assign listaNueva2 =[]/> 
95				 
96				<#list finalEntries1 as lista> 
97 
98				        <#assign assetRenderer = lista.getAssetRenderer()> 
99						<#assign journalArticle = assetRenderer.getAssetObject()> 
100						 
101						<#assign currentArticleResourcePrimKey = journalArticle.getResourcePrimKey() /> 
102						<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
103						<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
104						 
105 
106						<#assign documentcurrentArticle = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
107						<#assign rootElementcurrentArticle = documentcurrentArticle.getRootElement() > 
108 
109						 
110						<#assign currentArticleTitulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
111				 
112						 
113						<#assign listaNueva =listaNueva+ [currentArticleTitulo.getData()+"##"+currentArticleAssetEntryId]/> 
114						 
115				 
116				</#list> 
117				<#--recorrrer la lista y recoger de nuevo las assetEntryes--> 
118				<#list listaNueva?sort as listaComarcaOrdenada> 
119						<#--${listaComarcaOrdenada}<br>--> 
120						<#assign id_entry = listaComarcaOrdenada?keep_after_last("##") /> 
121						<#assign finalEntries1Ordered =finalEntries1Ordered+[assetEntryLocalService.getAssetEntry(id_entry?number)] /> 
122						 
123				 
124				</#list> 
125				 
126				<#list finalEntries2 as lista2> 
127			 
128				        <#assign assetRenderer = lista2.getAssetRenderer()> 
129						<#assign journalArticle = assetRenderer.getAssetObject()> 
130					 
131						<#assign currentArticleResourcePrimKey = journalArticle.getResourcePrimKey() /> 
132						<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
133						<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
134						 
135 
136						<#assign documentcurrentArticle = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
137						<#assign rootElementcurrentArticle = documentcurrentArticle.getRootElement() > 
138 
139						 
140						<#assign currentArticleTitulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
141						 
142						 
143						<#assign listaNueva2 =listaNueva2+ [currentArticleTitulo.getData()+"##"+currentArticleAssetEntryId] /> 
144						 
145				 
146				</#list>	 
147				<#list listaNueva2?sort as listaDipuOrdenada> 
148						<#--${listaDipuOrdenada}<br>--> 
149						<#assign id_entry2 = listaDipuOrdenada?keep_after_last("##") /> 
150				 
151						<#assign finalEntries2Ordered =finalEntries2Ordered+[assetEntryLocalService.getAssetEntry(id_entry2?number)] /> 
152				 
153				</#list>				 
154					 
155					<#assign finalEntries =finalEntries1Ordered+finalEntries2Ordered > 
156				</#if > 
157 
158			<#else><#-- NO SE SELECCIONADO COMARCA-->	 
159 
160				<#if searcher?exists>				 
161					<#assign finalEntries = searcher.searchContents(entries, temaseleccionado, null, filtro)> 
162					<#--ORDERNA LSITAS --> 
163					<#assign finalEntriesOrdered = []/> 
164					<#assign listaNueva =[]/> 
165					<#list finalEntries as lista> 
166 
167				        <#assign assetRenderer = lista.getAssetRenderer()> 
168						<#assign journalArticle = assetRenderer.getAssetObject()> 
169						 
170						<#assign currentArticleResourcePrimKey = journalArticle.getResourcePrimKey() /> 
171						<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
172						<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
173						 
174 
175						<#assign documentcurrentArticle = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
176						<#assign rootElementcurrentArticle = documentcurrentArticle.getRootElement() > 
177 
178						 
179						<#assign currentArticleTitulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
180				 
181						 
182						<#assign listaNueva =listaNueva+ [currentArticleTitulo.getData()+"##"+currentArticleAssetEntryId]/> 
183						 
184				 
185					</#list> 
186					<#--recorrrer la lista y recoger de nuevo las assetEntryes--> 
187					<#list listaNueva?sort as listaComarcaOrdenada> 
188							<#--${listaComarcaOrdenada}<br>--> 
189							<#assign id_entry = listaComarcaOrdenada?keep_after_last("##") /> 
190							<#assign finalEntriesOrdered =finalEntriesOrdered+[assetEntryLocalService.getAssetEntry(id_entry?number)] /> 
191							 
192					 
193					</#list> 
194					<#assign finalEntries =finalEntriesOrdered /> 
195					<#--FIN ORDERNA LSITAS --> 
196				</#if >			 
197			 
198			</#if > 
199		<#else><#-- NO SE HA SELECCIONADO TEMA-->	 
200 
201			<#if !validator.equals("", comarcasCategory?trim)><#-- SE SELECCIONADO COMARCA--> 
202 
203		<#assign comarcaseleccionada="1" /> 
204				<#if searcher?exists> 
205					<#assign finalEntries1 = searcher.searchContents(entries, comarcasCategory, null, filtro)> 
206					<#assign finalEntries2 = searcher.searchContents(entries, comarcaTodasCategoryId, null, filtro)> 
207					<#assign finalEntries1Ordered = []/>					 
208					<#assign finalEntries2Ordered = []/> 
209					 
210				</#if > 
211				<#--nuevo--> 
212				<#assign listaNueva =[]/> 
213				<#assign listaNueva2 =[]/> 
214				 
215				<#list finalEntries1 as lista> 
216 
217				        <#assign assetRenderer = lista.getAssetRenderer()> 
218						<#assign journalArticle = assetRenderer.getAssetObject()> 
219						 
220						<#assign currentArticleResourcePrimKey = journalArticle.getResourcePrimKey() /> 
221						<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
222						<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
223						 
224 
225						<#assign documentcurrentArticle = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
226						<#assign rootElementcurrentArticle = documentcurrentArticle.getRootElement() > 
227 
228						 
229						<#assign currentArticleTitulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
230				 
231						 
232						<#assign listaNueva =listaNueva+ [currentArticleTitulo.getData()+"##"+currentArticleAssetEntryId]/> 
233						 
234				 
235				</#list> 
236				<#--recorrrer la lista y recoger de nuevo las assetEntryes--> 
237				<#list listaNueva?sort as listaComarcaOrdenada> 
238						<#--${listaComarcaOrdenada}<br>--> 
239						<#assign id_entry = listaComarcaOrdenada?keep_after_last("##") /> 
240						<#assign finalEntries1Ordered =finalEntries1Ordered+[assetEntryLocalService.getAssetEntry(id_entry?number)] /> 
241						 
242				 
243				</#list> 
244				 
245				<#list finalEntries2 as lista2> 
246			 
247				        <#assign assetRenderer = lista2.getAssetRenderer()> 
248						<#assign journalArticle = assetRenderer.getAssetObject()> 
249					 
250						<#assign currentArticleResourcePrimKey = journalArticle.getResourcePrimKey() /> 
251						<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
252						<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
253						 
254 
255						<#assign documentcurrentArticle = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
256						<#assign rootElementcurrentArticle = documentcurrentArticle.getRootElement() > 
257 
258						 
259						<#assign currentArticleTitulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
260						 
261						 
262						<#assign listaNueva2 =listaNueva2+ [currentArticleTitulo.getData()+"##"+currentArticleAssetEntryId] /> 
263						 
264				 
265				</#list>	 
266				<#list listaNueva2?sort as listaDipuOrdenada> 
267						<#--${listaDipuOrdenada}<br>--> 
268						<#assign id_entry2 = listaDipuOrdenada?keep_after_last("##") /> 
269				 
270						<#assign finalEntries2Ordered =finalEntries2Ordered+[assetEntryLocalService.getAssetEntry(id_entry2?number)] /> 
271				 
272				</#list>				 
273 
274		<#assign finalEntries =finalEntries1Ordered+finalEntries2Ordered > 
275				 
276			<#else><#-- NO SE SELECCIONADO COMARCA-->			 
277		 
278				<#if searcher?exists> 
279					<#assign finalEntries = searcher.searchContents(entries, "", null, filtro)> 
280						<#--ORDERNAR LA LISTA:--> 
281					<#assign finalEntriesOrdered = []/> 
282					<#assign listaNueva =[]/> 
283					<#list finalEntries as lista> 
284 
285				        <#assign assetRenderer = lista.getAssetRenderer()> 
286						<#assign journalArticle = assetRenderer.getAssetObject()> 
287						 
288						<#assign currentArticleResourcePrimKey = journalArticle.getResourcePrimKey() /> 
289						<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
290						<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
291						 
292 
293						<#assign documentcurrentArticle = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
294						<#assign rootElementcurrentArticle = documentcurrentArticle.getRootElement() > 
295 
296						 
297						<#assign currentArticleTitulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
298				 
299						 
300						<#assign listaNueva =listaNueva+ [currentArticleTitulo.getData()+"##"+currentArticleAssetEntryId]/> 
301						 
302				 
303					</#list> 
304					<#--recorrrer la lista y recoger de nuevo las assetEntryes--> 
305					<#list listaNueva?sort as listaComarcaOrdenada> 
306							<#--${listaComarcaOrdenada}<br>--> 
307							<#assign id_entry = listaComarcaOrdenada?keep_after_last("##") /> 
308							<#assign finalEntriesOrdered =finalEntriesOrdered+[assetEntryLocalService.getAssetEntry(id_entry?number)] /> 
309							 
310					 
311					</#list> 
312					<#assign finalEntries =finalEntriesOrdered /> 
313					<#--FIN ORDERNA LSITAS -->						 
314 
315				</#if > 
316			</#if > 
317		</#if>	 
318<#else> 
319 
320    
321	<#assign finalEntries = searcher.searchContents(entries, "", null, filtro)> 
322	<#--ORDERNAR LA LISTA:--> 
323				 
324		<#assign finalEntriesOrdered = []/> 
325		<#assign listaNueva =[]/> 
326		<#list finalEntries as lista> 
327 
328			<#assign assetRenderer = lista.getAssetRenderer()> 
329			<#assign journalArticle = assetRenderer.getAssetObject()> 
330			 
331			<#assign currentArticleResourcePrimKey = journalArticle.getResourcePrimKey() /> 
332			<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
333			<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
334			 
335 
336			<#assign documentcurrentArticle = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
337			<#assign rootElementcurrentArticle = documentcurrentArticle.getRootElement() > 
338 
339			 
340			<#assign currentArticleTitulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
341	 
342			 
343			<#assign listaNueva =listaNueva+ [currentArticleTitulo.getData()+"##"+currentArticleAssetEntryId]/> 
344			 
345	 
346		</#list> 
347		<#--recorrrer la lista y recoger de nuevo las assetEntryes--> 
348		<#list listaNueva?sort as listaComarcaOrdenada> 
349				<#--${listaComarcaOrdenada}<br>--> 
350				<#assign id_entry = listaComarcaOrdenada?keep_after_last("##") /> 
351				<#assign finalEntriesOrdered =finalEntriesOrdered+[assetEntryLocalService.getAssetEntry(id_entry?number)] /> 
352				 
353		 
354		</#list> 
355		<#assign finalEntries =finalEntriesOrdered /> 
356		 
357	<#--FIN ORDERNAR LA LISTA:--> 
358</#if> 
359 
360 
361 
362	 
363<#-- ---------------------------------------------------------------------------------------------------- --> 
364 
365 
366 
367<#-- ---------------------------------------------------------------------------------------------------- --> 
368<#assign beginIndex = currentPag - one> 
369<#assign begin = delta * beginIndex> 
370 
371<#assign end = begin + delta> 
372 
373<#assign totalEntriesSize = finalEntries?size> 
374 
375 
376<#assign totalPag = getterUtil.getInteger((finalEntries?size)/delta)> 
377<#if (finalEntries?size > delta)> 
378    <#assign totalPag = totalPag + one> 
379</#if> 
380 
381<#assign totalPagMod = finalEntries?size%delta> 
382<#assign totalEle = finalEntries?size> 
383<#assign renderPam = "&page="> 
384<#if !renderURL?contains("?")> 
385    <#assign renderPam = "?page="> 
386</#if> 
387 
388<#assign firstURL = renderURL + renderPam + one> 
389<#assign lastURL = renderURL + renderPam + totalPag> 
390 
391<#if (totalPag > one)> 
392    <#if (currentPag < totalPag)> 
393        <#assign nextValue = currentPag + one> 
394    <#else> 
395        <#assign nextValue = totalPag> 
396    </#if> 
397 
398    <#if (currentPag > one)> 
399        <#assign previousValue = currentPag - one> 
400    <#else> 
401        <#assign previousValue = one> 
402    </#if> 
403<#else> 
404    <#assign nextValue = one> 
405    <#assign previousValue = one> 
406</#if> 
407 
408<#assign nextURL = renderURL + renderPam + nextValue> 
409<#assign previousURL = renderURL + renderPam + previousValue> 
410<#assign message = delta> 
411<#assign init = (delta * (currentPag - one)) + one> 
412<#assign final = delta * currentPag> 
413 
414<#if (totalPag > one)> 
415    <#if (end < totalEle)> 
416        <#assign parameters = [init, end, totalEle]> 
417    <#else> 
418        <#assign parameters = [init, totalEle, totalEle]> 
419    </#if> 
420     
421    <#assign message = languageUtil.format(locale, "showing-x-x-of-x-results", parameters)> 
422<#else> 
423    <#assign parameters = [totalEle]> 
424    <#if (totalEle == one)> 
425        <#assign message = languageUtil.format(locale, "showing-x-result", parameters)> 
426    <#else> 
427        <#assign message = languageUtil.format(locale, "showing-x-results", parameters)> 
428    </#if> 
429</#if> 
430 
431<#if (finalEntries?size > zero)> 
432    <#if (end < totalEle)> 
433        <#assign finalEntries = finalEntries[begin..(end-one)]> 
434    <#else> 
435        <#assign finalEntries = finalEntries[begin..(totalEle-one)]> 
436    </#if> 
437</#if> 
438 
439<div class="iy-strctures-card-container"> 
440<div class="iybg-container"> 
441 
442<h2><span class="iy-text-color-red iy-text-size-XL">${totalEle}</span> 
443	<#if validator.equals("1", comarcaseleccionada) > 
444		<#if validator.equals(locale.getLanguage(),"es")> 
445				<#assign texto= "(Dirigidas a las personas residentes en la comarca seleccionada)" /> 
446			<#else> 
447				<#assign texto= " (Hautatutako eskualdean bizi diren pertsonei zuzenduak) " />					 
448		</#if> 
449	 
450	</#if> 
451	 
452	 
453    <#if (totalEle == one)> 
454        <@liferay.language key="iybg.programas.iniciativa.encontrada.upper"/> 
455		<span class="iybg_alignedSmallTxt">${texto}</span> 
456 
457    <#else> 
458        <@liferay.language key="iybg.programas.iniciativas.encontradas.upper"/><span class="iybg_alignedSmallTxt">${texto}</span> 
459    </#if>     
460</h2> 
461 
462<#assign isConv=getterUtil.getBoolean("false")> 
463<#if filtro?exists && filtro=="conv"> 
464    <#assign isConv=getterUtil.getBoolean("true")> 
465</#if> 
466 
467 
468<nav class="nav red-separated-bottom-line"> 
469<ul class="navbar-nav"> 
470    <li ><a id="navTodas" class="nav-link active" href="${renderURL}"><@liferay.language key="iybg.programas.todas.upper"/></a></li> 
471    <#if (params?size > one)> 
472	    <li><a id="navConv" class="nav-link" href="${renderURL}&conv"><@liferay.language key="iybg.programas.con_convocatorias.upper"/></a></li> 
473    <#else> 
474        <li><a id="navConv" class="nav-link" href="${renderURL}?conv"><@liferay.language key="iybg.programas.con_convocatorias.upper"/></a></li> 
475    </#if> 
476</ul> 
477</nav> 
478 
479<#if finalEntries?size != zero> 
480     
481    <div class="row flex-box"> 
482    <#assign i = getterUtil.getLong("1")> 
483 
484    <#list finalEntries as curEntry> 
485        <#assign assetRenderer = curEntry.getAssetRenderer()> 
486        <#assign journalArticle = assetRenderer.getAssetObject()> 
487        <#assign renderer = curEntry.getAssetRenderer()> 
488        <#assign className = renderer.getClassName()> 
489           <#--  
490        <#assign layoutUuid = journalArticle.getLayoutUuid() 
491        <#assign modifiedDate = journalArticle.getModifiedDate()> 		 
492		>--> 
493 
494 
495        <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
496		<#assign viewURL = renderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
497		 
498        <#if !validator.equals("showFullContent", assetLinkBehavior?string)> 
499			<#assign viewURL = renderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
500		</#if> 
501 
502        <#-- Plantilla para pintar cada uno de los registros de programas e iniciativas --> 
503        <#assign currentArticleResourcePrimKey = journalArticle.getResourcePrimKey() /> 
504        <#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
505        <#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
506		<#assign titulo_mostrar = currentArticleAssetEntry.getTitle(locale) /> 
507        <#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
508 
509 
510        <#assign documentcurrentArticle = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
511        <#assign rootElementcurrentArticle = documentcurrentArticle.getRootElement() > 
512		 
513        <#assign currentArticleTitulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
514        <#assign currentArticleDescripcion = saxReaderUtil.createXPath("dynamic-element[@name='descripcion']/dynamic-content").selectSingleNode(rootElementcurrentArticle) > 
515        <#assign currentArticleFoto = saxReaderUtil.createXPath("dynamic-element[@name='foto']/dynamic-content").selectSingleNode(rootElementcurrentArticle).getStringValue() > 
516		 
517 
518 
519        <#-- Categorias de tipo Ambito asociadas al journalArticle que se está mostrando--> 
520        <#assign ambitosVocabularyName = "BG-Ambitos" /> 
521        <#assign ambitosVocabulary = assetVocabularyLocalService.getGroupVocabulary(themeDisplay.getCompanyGroupId(), ambitosVocabularyName) /> 
522        <#assign categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", getterUtil.getLong(currentArticleResourcePrimKey)) > 
523 
524        <#list categories as category> 
525            <#if validator.equals(category.vocabularyId?string,ambitosVocabulary.getVocabularyId()?string)> 
526                <#assign categoria = category.getTitle(locale) > 
527                <#assign categoryImagen = assetCategoryPropertyLocalService.getCategoryProperty(category.getCategoryId(),"imagen")> 
528            </#if> 
529        </#list> 
530 
531        <div class="col-md-4 col-sm-6 col-xs-12">  
532            <div class="card" tabindex="0"> 
533                <div class="card-header"> 
534                    <#if currentArticleFoto?? && currentArticleFoto != ""> 
535                        <img class="card-img-top box-cover" src="${currentArticleFoto}" alt="" /> 
536                    <#else> 
537                        <#--Imagen predefinida por cada categoria --> 
538                       <img class="card-img-top" src="${themeDisplay.getPathThemeImages()}/bizkaiagazteak/${categoryImagen.getValue()}" > 
539 
540                    </#if>         
541                </div>  
542                <div class="card-body"> 
543 
544                    <#-- Ambito -->         
545                    <h5 class="card-title">${categoria}</h5> 
546                    <a href="${viewURL}?redirectUrl=${completeCurrentRedirecUrl}" title='<@liferay.language key="iybg.programas.ir-detalle"/>' tabindex="-1"><p class="card-text fw-medium"> 
547					<#--${titulo_mostrar}<bR>-->${currentArticleTitulo.getData()}</p></a> 
548                    <#if currentArticleDescripcion.getData()?has_content> 
549                        <p class="card-text"> 
550                            <small class="text-muted"> 
551                                <#if (currentArticleDescripcion.getData()?length > maxDescLength) > 
552                                    ${currentArticleDescripcion.getData()[0..*(maxDescLength-3)]+"..."} 
553                                <#else> 
554                                    ${currentArticleDescripcion.getData()} 
555                                </#if> 
556                            </small> 
557                        </p> 
558                    </#if> 
559 
560                    <#list currentArticleRelatedLinks as related_entry> 
561                        <#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
562                        <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
563                        <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
564                        <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
565                        <#assign relatedArticleId = relatedArticle.getArticleId() /> 
566                    </#list> 
567 
568                    <#if currentArticleRelatedLinks?has_content > 
569                    <p class="iy-link-convocatorias">  
570                        <#assign totalrelatedarticlesSize = currentArticleRelatedLinks?size> 
571                        <span class="bipoicon icon-calendar" aria-hidden="true"></span> <span class="badge iy-text-color-red iy-text-size-L">${totalrelatedarticlesSize}</span> 
572                        <#if (totalrelatedarticlesSize == one)> 
573                            <@liferay.language key="iybg.programas.convocatoria_relacionada" /> 
574                        <#else> 
575                            <@liferay.language key="iybg.programas.convocatorias_relacionadas" /> 
576                        </#if> 
577                    </p>                 
578                    </#if> 
579 
580                </div>     
581            </div> 
582        </div> 
583 
584        <#if i%numElemFila=0> 
585		<#-- 
586            </div> 
587            <div class="row"> 
588			--> 
589        </#if> 
590        <#assign i = i + 1 > 
591    </#list> 
592    </div> 
593 
594    <#if (totalEntriesSize > delta)> 
595        <div class="taglib-page-iterator" > 
596            <div class="clearfix lfr-pagination" > 
597             <#--   <small>${message}</small>--> 
598                    <ul class="pager pager lfr-pagination-buttons"> 
599                        <#if (currentPag == one)> 
600                            <li class="disabled first"> 
601                                <a href="">&larr; <@liferay.language key="first" /></a></li> 
602                        <#else> 
603                            <li class="first"> 
604                                 <a href="${firstURL}">&larr; <@liferay.language key="first" /></a></li> 
605                        </#if> 
606                         
607                        <#if (currentPag == one)> 
608                            <li class="disabled">    
609                               <a href=""><@liferay.language key="previous" /></a></li> 
610                        <#else> 
611                            <li> 
612                                <a href="${previousURL}"><@liferay.language key="previous" /></a></li> 
613                        </#if> 
614                         
615                             
616                        <#if (currentPag == totalPag)> 
617                            <li class="disabled"> 
618                                <a href=""><@liferay.language key="next" /></a></li> 
619                        <#else> 
620                            <li> 
621                                <a href="${nextURL}"><@liferay.language key="next" /></a></li> 
622                        </#if> 
623                             
624                        <#if (currentPag == totalPag)> 
625                            <li class="disabled last"> 
626                                <a href=""><@liferay.language key="last" /> &rarr;</a></li> 
627                        <#else> 
628                            <li class="last"> 
629                                <a href="${lastURL}"><@liferay.language key="last" /> &rarr;</a></li> 
630                        </#if> 
631                    </ul> 
632            </div> 
633        </div> 
634    </#if>   
635<#else> 
636    <div class="alert alert-info type01"> 
637        <p class="flex-container"><span class="bipoicon icon-calendar"></span> <span><@liferay.language key="iybg.programas.no-results"/></span></p> 
638    </div> 
639</#if> 
640</div> 
641</div> 
642 
643 
644<script type="text/javascript"> 
645 
646    $(function() { 
647        // Handler for .ready() called. 
648        var isConv=${isConv?c}; 
649         
650        $("ul.navbar-nav li a").removeClass("active"); 
651        if (String(isConv)=="true"){ 
652            $("#navConv").addClass("active"); 
653        }else{ 
654            $("#navTodas").addClass("active"); 
655
656 
657		$(".card").click(function(event){ 
658			var linkProg = $(this).find('a').attr('href'); 
659			$(location).attr('href',linkProg); 
660		}); 
661		$(".card").keypress(function(e) { 
662			var code = (e.keyCode ? e.keyCode : e.which); 
663			if(code===13){ 
664				var linkProg = $(this).find('a').attr('href'); 
665		 
666				$(location).attr('href',linkProg); 
667				 
668
669		});		 
670		   
671		 
672     
673    }); 
674 
675</script>