Custom Detail

An error occurred while processing the template.
Java method "it.itacro2127.service.util.jsoup.impl.JsoupServiceUtilImpl.searchJournalArticle(long, String, long, String, com.liferay.portal.kernel.theme.ThemeDisplay, String, long, long[], long[])" threw an exception when invoked on it.itacro2127.service.util.jsoup.impl.JsoupServiceUtilImpl object "it.itacro2127.service.util.jsoup.impl.JsoupServiceUtilImpl@3d54a85c"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign listJournal = journalArticleC...  [in template "20097#20123#38530" at line 319, column 41]
----
1<#-- PRDDUZIONE 
2Dettaglio news template  
303/01/2023 
4--> 
5 
6<#-- immagine ettaglio eventi: hero-news-detail.png/ --> 
7<#assign imgUrl = themeDisplay.getPathContext() + "/documents/555109/555017/hero-news-detail.png/7ccb605c-e8f2-041a-336c-0f165e431af1?t=1680765000975" /> 
8 
9<#--Modifica del 6/07/2023--> 
10<#assign imgUrlMinisito = themeDisplay.getPathContext() + "/documents/1072491/1072519/header-1.png/e2ad44eb-30fc-440f-acbf-687e05d03af5?t=1689159332206"/> 
11 
12 
13<#-- fileEntryTypeId del document Types "Documenti italia-croatia" --> 
14<#assign fileEntryTypeId=555029> 
15<#-- templateKey News card ADT--> 
16<#assign templateKeyCardNews ="38704"> 
17<#assign templateKeyCardEvents ="38884"> 
18<#-- vocabolaryId priority axis--> 
19<#assign vocabularyIdPA = 555914 > 
20 
21<#-- vocabolaryId Themes--> 
22<#assign vocabolaryIdThemes = 555917 > 
23 
24<#assign groupIdITACRO = 555109 > 
25 
26<#-- MODIFICHE 05/12/2023 --> 
27 
28<#assign structureIdNews = 555448> 
29<#assign structureIdEvents = 555445> 
30 
31<#-- END --> 
32 
33<#assign displaydate = .vars['reserved-article-display-date'].data> 
34<#assign originalLocale = .locale> 
35<#setting locale = localeUtil.getDefault()> 
36<#assign displaydate = displaydate?datetime("EEE, d MMM yyyy HH:mm:ss Z")> 
37 
38<#assign iconeCategorieService = serviceLocator.findService('it.itacro2127.icone.categorie.service.IconeCategorieService')> 
39 
40<#assign dlFileEntryService = serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryService')> 
41 
42<#assign journalArticleId = .vars['reserved-article-id'].data> 
43 
44<#assign urlIconImage = iconeCategorieService.getUrlIconCategory(themeDisplay,groupId,journalArticleId)> 
45 
46<#assign nameCategory = iconeCategorieService.getNameCategory(themeDisplay,groupId,journalArticleId)> 
47 
48<#assign categorySource = iconeCategorieService.getCategorySource(themeDisplay,groupId,journalArticleId)> 
49 
50<#assign groupLocalServiceUtil = staticUtil["com.liferay.portal.kernel.service.GroupLocalServiceUtil"] > 
51 
52<#assign friendlyUrl = ""> 
53<#assign JsonFactory =  staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"]> 
54 
55 
56<#assign DLFileVersionLocalServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileVersionLocalService")> 
57 
58 
59<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
60<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>  
61<#assign article = journalArticleLocalService.getArticle(groupId, journalArticleId)> 
62 
63<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
64 
65<#assign listAssetCategory = assetCategoryLocalService.getCategories('com.liferay.journal.model.JournalArticle', article.resourcePrimKey) > 
66 
67<#assign journalArticleCustom = serviceLocator.findService("it.itacro2127.service.util.jsoup.JsoupServiceUtil")> 
68 
69<#attempt> <#assign friendlyUrl = groupLocalServiceUtil.getGroup(groupId).getFriendlyURL()/><#recover> </#attempt> 
70 
71<#assign urlSite = themeDisplay.getURLPortal()+"/web"+friendlyUrl> 
72 
73         
74<#assign titleNews=""> 
75<#if title.getData()?has_content> 
76	<#assign titleNews=title.getData()> 
77</#if> 
78 
79<#macro bredCrumbCustom> 
80  	<#-- Figli di home che hanno figli <-non cliccabili --> 
81<#assign portalUtil = objectUtil("com.liferay.portal.kernel.util.PortalUtil")/> 
82	<ol id="breadcrumb" class="breadcrumb text-white pl-0 pt-0 pb-4">  
83		<#list themeDisplay.getLayout().getAncestors()?reverse as ancLay> 
84			<#if ancLay?index == 1 && ancLay.hasChildren()> 
85				<li class="breadcrumb-item"> ${ancLay.getName(locale)} </a> </li>  
86			<#else> 
87				<li class="breadcrumb-item"> <a href="${portalUtil.getLayoutFriendlyURL(ancLay, themeDisplay)}"> ${ancLay.getName(locale)} </a> </li>  
88			</#if> 
89		</#list> 
90		<#-- pagina corrente da non disegnare SE è una pagina di dettaglio --> 
91		 
92		<#assign show_current_page = true > 
93 
94		<#if themeDisplay.getLayout().getName(locale)?starts_with("Dettaglio") || themeDisplay.getLayout().getName(locale)?ends_with("details")> 
95			<#assign show_current_page = false > 
96		</#if> 
97 
98		<#if show_current_page> 
99			<li class="breadcrumb-item"> ${themeDisplay.getLayout().getName(locale)} </a> </li>  
100		</#if> 
101	</ol> 
102</#macro> 
103 
104<div id="main_dettaglio_News"> 
105 
106  <#if themeDisplay.getScopeGroupId() == groupIdITACRO> 
107 
108    <div id="hero-page" class="hero-ricerche"> 
109    	<div class="hero-img-3"> 
110    		<img src="${imgUrl}" alt=""> 
111    	</div> 
112    	<div class="container"> 
113     
114 
115 
116 
117<#-- call the macro: --> 
118<@bredCrumbCustom /> 
119      
120      
121      
122    <#--	<@liferay_portlet["runtime"] 
123			instanceId="breadcrumb" 
124			portletProviderAction=portletProviderAction.VIEW 
125            portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry" 
126             portletProviderClassName="com.liferay.asset.kernel.model.AssetEntry" 
127             
128            />--> 
129             
130            <div class="row"> 
131				<div class="col-12 col-lg-5"> 
132    				<#if titleNews?has_content> 
133    					<h2 class="pb-2 pb-lg-5">${titleNews}</h2> 
134    				</#if> 
135    			 
136    				<!-- Qui verrano recuperate le categorie themes --> 
137    				<div class="d-flex pb-2 pb-lg-5"> 
138						<#list listAssetCategory as assetCategory  > 
139							<#if assetCategory.getVocabularyId() == vocabolaryIdThemes> 
140								 
141								<a href="#" categoryId="${assetCategory.categoryId}" class="injectRicerca badge badge-pill badge-light mr-3">${assetCategory.name}</a> 
142								 
143							</#if> 
144	 
145						</#list> 
146							 
147							 
148					</div> 
149			    </div> 
150			</div> 
151    	</div> 
152    </div> 
153     
154    <#else> 
155     
156       <div id="hero-page" class="hero-ricerche"> 
157			<div class="hero-img-2"> 
158			<#if (imgUrlMinisito)?has_content> 
159					<img src="${imgUrlMinisito}" alt=""> 
160				</#if> 
161			</div> 
162 
163			<div class="container pb-5">		 
164			<div class="bg-hero col-12 col-md-8 "> 
165				  <div class="row no-title">  
166						 <div class="" > 
167<#-- call the macro: --> 
168<@bredCrumbCustom /> 
169				      </div> 
170				  </div> 	 
171			    <div class="row"> 
172					   <div class="col-12 col-lg-5">	   
173						  <#if (title.getData())?has_content> 
174							<h2 class="pb-2 pb-lg-5">${title.getData()}</h2> 
175						</#if> 
176					   </div> 
177			    </div> 
178		   </div> 
179	     </div> 
180    </div> 
181     
182    </#if> 
183 
184     
185</div> 
186 
187 
188 
189 
190 
191<section class="section"> 
192	<div class="container py-4 py-lg-5"> 
193		<div class="row"> 
194            <div class="col-lg-8"> 
195                <p class="text-date">${displaydate?string["dd/MM/yyyy"]}</p> 
196                 
197                	<#if (singleImage.getData())?has_content && singleImage.getData() != ""> 
198                        <div class="row pb-4"> 
199                           <div class="col-12"> 
200                                <img class="w-100" alt="" src="${singleImage.getData()}" /> 
201                            </div> 
202                        </div>     
203                    </#if> 
204                 
205                <#if (text.getData())?has_content> 
206	                ${text.getData()} 
207                </#if> 
208                 
209				<#assign immaginiDaVisualizzare = []> 
210				<#if imagesCarousel.getSiblings()?has_content && imagesCarousel.getSiblings()?size gte 1> 
211					<#list imagesCarousel.getSiblings() as cur_imagesCarousel> 
212						<#if (cur_imagesCarousel.getData())?? && cur_imagesCarousel.getData() != ""> 
213							<#assign immaginiDaVisualizzare = immaginiDaVisualizzare + [cur_imagesCarousel.getData()]> 
214						</#if> 
215					</#list> 
216				</#if> 
217 
218 
219<#if (immaginiDaVisualizzare?size == 1)> 
220	<img class="w-100" src="${immaginiDaVisualizzare[0]}" alt=""> 
221 
222<#elseif (immaginiDaVisualizzare?size gt 1)> 
223	<section id="main-carousel" class="px-2 splide" aria-label="Image carousel"> 
224		<div class="splide__track"> 
225			<ul class="splide__list"> 
226				<#list immaginiDaVisualizzare as cur_imagesCarousel> 
227						<li class="splide__slide"> 
228							<img src="${cur_imagesCarousel}" alt=""> 
229						</li> 
230				</#list> 
231			</ul> 
232		</div> 
233	</section> 
234	<section id="thumbnail-carousel" class="splide" aria-label="Image carousel thumbnails"> 
235		<div class="splide__track"> 
236				<ul class="splide__list"> 
237			<#list immaginiDaVisualizzare as cur_imagesCarousel> 
238					<li class="splide__slide"> 
239						<img src="${cur_imagesCarousel}" alt=""> 
240					</li> 
241			</#list> 
242				</ul> 
243		</div> 
244	</section> 
245</#if> 
246 
247				<!-- sezione contenuti correlati -->  
248				<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
249				<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
250				<#assign article = journalArticleLocalService.getArticle(getterUtil.getLong(groupId), journalArticleId)> 
251				<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', article.resourcePrimKey) > 
252    			<#assign journalAssetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") />	 
253				<#assign journalArticleRelatedEntry = journalAssetLinkLocalService.getDirectLinks(asset.getEntryId()) /> 
254				 
255				 
256				<#if journalArticleRelatedEntry?has_content> 
257					 
258						<div class="row mt-5"> 
259							<div class="col-12"> 
260								<h3 class="h3">Related news</h3> 
261							</div> 
262						</div> 
263						<div class="row my-2"> 
264						<#list journalArticleRelatedEntry as relatedEntry>	 
265							<#assign relatedAssetEntryId = relatedEntry.getEntryId2() /> 
266							<#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId ) /> 
267							<#assign relatedJournalArticle = journalArticleLocalService.getLatestArticle( relatedAssetEntry.getClassPK() ) /> 
268							<#assign renderer = relatedAssetEntry.getAssetRenderer() > 
269							<#assign journalArticle = renderer.getArticle() > 
270							<#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(themeDisplayLocale))  > 
271							<#assign rootElement = document.document.getRootElement()  > 
272										 
273						 
274						 <#assign content = journalArticleLocalService.getArticleContent(journalArticle, templateKeyCardNews, "VIEW", locale,model, themeDisplay)!"" /> 
275						 <div class="col-md-6 mb-4"> 
276							${content} 
277						</div> 
278						</#list> 
279						</div> 
280				<#else> 
281					<#assign categoryPriorityId = [] > 
282					<#assign categoryThemesId = [] > 
283					<#list listAssetCategory as assetCategory>	 
284				 
285						<#if assetCategory.name?contains("PROGRAMME")> 
286								<#assign categoryPriorityId	= categoryPriorityId + [assetCategory.categoryId]> 
287								<#break> 
288						<#else> 
289							<#if assetCategory.getVocabularyId() == vocabularyIdPA> 
290								<#assign categoryPriorityId	= categoryPriorityId + [assetCategory.categoryId]> 
291							</#if> 
292						</#if> 
293 
294						<#if assetCategory.getVocabularyId() == vocabolaryIdThemes> 
295							<#assign categoryThemesId	= categoryThemesId + [assetCategory.categoryId]> 
296						</#if> 
297					</#list>		 
298 
299 
300 
301					<#-- 
302					 
303	public List<String> searchJournalArticle( 
304			long structureIdNews, String templateKeyNew, 
305			long structureIdEvents, String templateKeyEvents, 
306			ThemeDisplay themeDisplay, String articleIdContent,  
307			String dateSorting, long groupId,  
308			long[] themeCategory,  
309			long[] priorityCategory); 
310 
311					--> 
312				<#assign textRelated = "Related news"> 
313              	<#if themeDisplay.getScopeGroupId() == groupIdITACRO> 
314                    <#-- sono nel sito principale, recupero soltanto le news --> 
315					<#assign listJournal = journalArticleCustom.searchJournalArticle(structureIdNews, templateKeyCardNews, 0, "", themeDisplay, journalArticleId, 0, categoryThemesId, categoryPriorityId)> 
316				<#else> 
317					<#-- sono in un minisito, recupero eventi e news del minisito --> 
318                    <#assign textRelated = "Related news and events"> 
319					<#assign listJournal = journalArticleCustom.searchJournalArticle(structureIdNews, templateKeyCardNews, structureIdEvents, templateKeyCardEvents, themeDisplay, journalArticleId, groupId, categoryThemesId, categoryPriorityId)> 
320				</#if> 
321 
322 
323					<#if listJournal?has_content> 
324					<div class="row mt-5"> 
325						<div class="col-12"> 
326							<h3 class="h3">${textRelated}</h3> 
327						</div> 
328					</div> 
329					<div class="row my-2"> 
330						<#list listJournal as journal> 
331							<div class="col-md-6 mb-4"> 
332								${journal} 
333							</div> 
334							<#if journal?index == 1> 
335								<#break> 
336							</#if> 
337						</#list> 
338					</div> 
339					</#if> 
340			    </#if> 
341			 
342			 
343				<!-- sezione contenuti correlati -->  
344 
345		</div> 
346    <!-- CARD DX --> 
347<div class="col-lg-4"> 
348    <!-- CARD PROJECT --> 
349    <div class="card mb-4 border-bottom-card"> 
350		<div class="card-body pt-0"> 
351		    <div class="d-flex align-items-center pb-3"> 
352		       <#if categorySource?has_content> 
353		            <h3 class="h3 mb-0 mr-auto pt-4">${categorySource}</h3> 
354    		   </#if>     
355    		        <div class="flag-icon"></div> 
356		    </div> 
357		     
358		    <#assign margin=""> 
359		    <#if (categorySource?has_content)&&(categorySource=="Programme")>   
360		        <#assign margin="mb-1"> 
361		    </#if> 
362		    <div class="row flex-nowrap align-items-center no-gutters pl-3 ${margin}"> 
363		        <#if urlIconImage?has_content> 
364    				<div class="col-auto pr-2"> 
365    				    <img src="${urlIconImage}" class="ico-64" alt=""> 
366    				</div> 
367    			</#if> 
368    			<#if nameCategory?has_content> 
369        			<div class="col text-14 pl-3"> 
370    					<strong>${nameCategory}</strong> 
371    				</div> 
372    			</#if> 
373			</div> 
374			 
375			 
376			<#if (categorySource?has_content)&&(categorySource=="Project")>     
377			    <div class="row"> 
378			        <#if urlSite?has_content> 
379    				    <div class="col-12 py-3 text-center"> 
380    					    <a class="btn btn-outline-primary mb-3" href="${urlSite}">Site project</a> 
381    				    </div> 
382				    </#if> 
383			    </div> 
384			</#if> 
385		</div>        
386	</div>	 
387	<!-- CARD LINKS --> 
388	 
389		<#if link.linkTitle.getSiblings()?has_content > 
390			<#assign isLinkEmpty=false> 
391			<#list link.linkTitle.getSiblings() as cur_link_linkTitle> 
392			 
393				<#if cur_link_linkTitle.getData()?has_content && (((cur_link_linkTitle.linkInternalPage.getData())?has_content) || ((cur_link_linkTitle.externalLink.getData())?has_content))> 
394		 
395					<#assign isLinkEmpty=true> 
396 
397					<#break> 
398				</#if> 
399			</#list> 
400 
401			<#if isLinkEmpty >			 
402				 
403				<div class="card mb-4"> 
404					<div class="card-body"> 
405						<div class="d-flex align-items-center pb-3"> 
406							<h3 class="h3 mb-0 mr-auto">Links</h3> 
407							<div class="title-link-ico d-flex align-items-center px-3 "> 
408								<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 
409										fill="currentColor" class="bi bi-link-45deg" viewBox="0 0 16 16"> 
410										<path 
411										d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z" /> 
412										<path 
413										d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z" /> 
414								</svg> 
415							</div> 
416						</div> 
417							<div class="list-group list-group-flush"> 
418						<#list link.linkTitle.getSiblings() as cur_link_linkTitle> 
419							<#if (cur_link_linkTitle.getData())?has_content>						 
420							 
421							 
422											 
423									<#if ((cur_link_linkTitle.linkInternalPage.getData())?has_content)&& ((cur_link_linkTitle.externalLink.getData())?has_content)> 
424										<a href="${cur_link_linkTitle.externalLink.getData()}" class="list-group-item list-group-item-action" target="_blank" title="link esterno"> 
425										<span class="sr-only"> Apre una nuova scheda</span> 
426											<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" 
427												fill="currentColor" class="bi bi-box-arrow-up-right" viewBox="0 0 16 16"> 
428													<path fill-rule="evenodd" 
429													d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z" /> 
430													<path fill-rule="evenodd" 
431													d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z" /> 
432											</svg> ${cur_link_linkTitle.getData()}</a> 
433									<#elseif ((cur_link_linkTitle.linkInternalPage.getData())?has_content)&& (!(cur_link_linkTitle.externalLink.getData())?has_content)> 
434										<a href="${cur_link_linkTitle.linkInternalPage.getFriendlyUrl()}" class="list-group-item list-group-item-action" title="link interno"> 
435											<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" 
436															fill="currentColor" class="bi bi-arrow-right" 
437															viewBox="0 0 16 16"> 
438															<path fill-rule="evenodd" 
439																d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z" /> 
440														</svg> ${cur_link_linkTitle.getData()}</a> 
441									<#elseif (!(cur_link_linkTitle.linkInternalPage.getData())?has_content)&& ((cur_link_linkTitle.externalLink.getData())?has_content)> 
442										<a href="${cur_link_linkTitle.externalLink.getData()}" class="list-group-item list-group-item-action"target="_blank" title="link esterno"> 
443										<span class="sr-only"> Apre una nuova scheda</span> 
444											<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" 
445												fill="currentColor" class="bi bi-box-arrow-up-right" viewBox="0 0 16 16"> 
446													<path fill-rule="evenodd" 
447													d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z" /> 
448													<path fill-rule="evenodd" 
449													d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z" /> 
450											</svg> ${cur_link_linkTitle.getData()} 
451										</a> 
452									</#if> 
453								 
454							</#if> 
455						</#list> 
456						</div> 
457					</div> 
458				</div> 
459			</#if> 
460		</#if> 
461	<!-- CARD DOCUMENTS --> 
462 
463	<#attempt>  
464	<#if documents.attachment.getSiblings()?has_content> 
465 
466		<#assign listaFileDaVisualizzare = []> 
467		<#assign dlFileName=""> 
468		<#assign dlFileSize=""> 
469			<#assign isDocumentEmpty = false> 
470		<#list documents.attachment.getSiblings() as cur_documents_attachment> 
471		<#-- Recupero il JSON che mi definisce il DL file Entry --> 
472			<#if cur_documents_attachment.get("data")?has_content > 
473				<#assign jsontDlFile = JsonFactory.createJSONObject(cur_documents_attachment.get("data"))> 
474		        <#if jsontDlFile?has_content> 
475    				<#assign groupIdFile = jsontDlFile.get("groupId")?number> 
476    				<#assign uuidFile = jsontDlFile.get("uuid")> 
477        			 
478        			<#assign dlFile = dlFileEntryService.getFileEntryByUuidAndGroupId(uuidFile,groupIdFile)> 
479        			<#assign idFileEntry = dlFile.getFileEntryId()> 
480        			<#assign fileVersionCount = DLFileVersionLocalServiceUtil.getFileVersionsCount(idFileEntry,8)> 
481					<#assign dlFileSize=dlFile.size?number> 
482					<#assign dlFileSize=dlFileSize / 1000000> 
483					<#assign dlFileSize=dlFileSize?string["0.##"]> 
484 
485        			<#if fileVersionCount==0> 
486        				<#if dlFile.getFileEntryTypeId()==fileEntryTypeId> 	 
487        					<#-- <#assign isDocumentEmpty = true> 
488        					<#break> --> 
489							<#assign listaFileDaVisualizzare = listaFileDaVisualizzare + [{"name":dlFile.fileName,"size":dlFileSize, "url": cur_documents_attachment.getData()}]> 
490        				</#if> 
491        			</#if> 
492        		</#if>	 
493    		</#if>	 
494		</#list> 
495		 
496		<#if listaFileDaVisualizzare?size gte 1> 
497			<div class="card mb-4"> 
498				<div class="card-body"> 
499					<div class="d-flex align-items-center pb-3"> 
500						<h3 class="h3 mb-0 mr-auto">Documents </h3> 
501						<div class="title-link-ico d-flex align-items-center px-3 "> 
502							<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 
503								fill="currentColor" class="bi bi-paperclip" viewBox="0 0 16 16"> 
504								<path 
505								d="M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0V3z" /> 
506							</svg> 
507						</div> 
508					</div> 
509					<div class="list-group list-group-flush"> 
510						<#list listaFileDaVisualizzare as cur_documents_attachment>		 
511							<a href="${cur_documents_attachment.url}" class="list-group-item list-group-item-action" target="_blank"><span class="sr-only">Apre una nuova scheda</span> 
512								<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-file-earmark-pdf" viewBox="0 0 16 16"> 
513							<path 
514								d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z" /> 
515							<path 
516								d="M4.603 14.087a.81.81 0 0 1-.438-.42c-.195-.388-.13-.776.08-1.102.198-.307.526-.568.897-.787a7.68 7.68 0 0 1 1.482-.645 19.697 19.697 0 0 0 1.062-2.227 7.269 7.269 0 0 1-.43-1.295c-.086-.4-.119-.796-.046-1.136.075-.354.274-.672.65-.823.192-.077.4-.12.602-.077a.7.7 0 0 1 .477.365c.088.164.12.356.127.538.007.188-.012.396-.047.614-.084.51-.27 1.134-.52 1.794a10.954 10.954 0 0 0 .98 1.686 5.753 5.753 0 0 1 1.334.05c.364.066.734.195.96.465.12.144.193.32.2.518.007.192-.047.382-.138.563a1.04 1.04 0 0 1-.354.416.856.856 0 0 1-.51.138c-.331-.014-.654-.196-.933-.417a5.712 5.712 0 0 1-.911-.95 11.651 11.651 0 0 0-1.997.406 11.307 11.307 0 0 1-1.02 1.51c-.292.35-.609.656-.927.787a.793.793 0 0 1-.58.029zm1.379-1.901c-.166.076-.32.156-.459.238-.328.194-.541.383-.647.547-.094.145-.096.25-.04.361.01.022.02.036.026.044a.266.266 0 0 0 .035-.012c.137-.056.355-.235.635-.572a8.18 8.18 0 0 0 .45-.606zm1.64-1.33a12.71 12.71 0 0 1 1.01-.193 11.744 11.744 0 0 1-.51-.858 20.801 20.801 0 0 1-.5 1.05zm2.446.45c.15.163.296.3.435.41.24.19.407.253.498.256a.107.107 0 0 0 .07-.015.307.307 0 0 0 .094-.125.436.436 0 0 0 .059-.2.095.095 0 0 0-.026-.063c-.052-.062-.2-.152-.518-.209a3.876 3.876 0 0 0-.612-.053zM8.078 7.8a6.7 6.7 0 0 0 .2-.828c.031-.188.043-.343.038-.465a.613.613 0 0 0-.032-.198.517.517 0 0 0-.145.04c-.087.035-.158.106-.196.283-.04.192-.03.469.046.822.024.111.054.227.09.346z" /> 
517							</svg> 
518							${cur_documents_attachment.name} (${cur_documents_attachment.size}) MB	 
519							</a> 
520						</#list> 
521					</div> 
522				</div> 
523			</div> 
524		</#if>	 
525	</#if> 
526<#recover> 
527							</#attempt> 
528</section> 
529 
530<script> 
531 
532function generaCarousel(){ 
533	    var main = new Splide( '#main-carousel', { 
534        type      : 'fade', 
535        rewind    : true, 
536        pagination: true, 
537        perPage: 1, 
538        arrows    : true, 
539        } ); 
540 
541        // Event listener per creare il carousel delle thumbnail 
542        var thumbnails = new Splide( '#thumbnail-carousel', { 
543            fixedWidth  : 100, 
544            fixedHeight : 60, 
545            gap         : 10, 
546            rewind      : true, 
547            pagination  : false, 
548            isNavigation: true, 
549            arrows    : true, 
550            breakpoints : { 
551                600: { 
552                fixedWidth : 60, 
553                fixedHeight: 44, 
554                }, 
555            }, 
556        } ); 
557 
558        main.sync( thumbnails ); 
559        main.mount(); 
560        thumbnails.mount(); 
561
562 
563Liferay.on('allPortletsReady', function () { 
564		var titleNews = '${titleNews}'; 
565		if(titleNews){ 
566		var breadcrumb = document.getElementById("breadcrumb"); 
567		if(breadcrumb){ 
568		  	var li = document.createElement('li'); 
569    		li.setAttribute('class','breadcrumb-item '); 
570    		li.innerText=titleNews; 
571    		breadcrumb.appendChild(li);   
572
573		 
574
575     
576	setTimeout(generaCarousel(), 1000); 
577 
578}); 
579 
580 
581</script>