Si è verificato un errore nell'elaborarazione del modello.
Java method "com.sun.proxy.$Proxy93.getFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy93 object "com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl@3a19e87b"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fileEntry = DLFileEntryLocalS...  [in template "10154#10192#37106" in macro "getLinkAndAllegati" at line 371, column 97]
	- Reached through: @getLinkAndAllegati  [in template "10154#10192#37106" at line 195, column 9]
----
1<#setting locale="it_IT"> 
2<#setting time_zone=timeZone.ID> 
3 
4<#assign hasCookie > 
5    <@rt.checkCookieAcceptance siteId=themeDisplay.getScopeGroupId() cookieToCheck="third-party" /> 
6</#assign> 
7 
8<#assign AssetEntryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil"] /> 
9<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
10<#assign DLFileEntryLocalServiceUtil =  serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryLocalService') />  
11 
12<#assign journalArticleId = .vars['reserved-article-id'].data/>  
13<#assign article = JournalArticleLocalService.getArticle(groupId, journalArticleId) /> 
14<#assign entry = AssetEntryLocalServiceUtil.fetchEntry("com.liferay.journal.model.JournalArticle", article.resourcePrimKey) /> 
15 
16<#assign assetRenderer = entry.getAssetRenderer() /> 
17<#assign entryTitle = htmlUtil.escape(entry.getTitle(locale)?html) /> 
18 
19<#assign AssetCategoryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil"]> 
20<#assign categoryList = AssetCategoryLocalServiceUtil.getAssetEntryAssetCategories(entry.entryId) /> 
21 
22<#assign docXml = saxReaderUtil.read(article.getContent()) /> 
23 
24<#assign rivoltoAChi = [] /> 
25<#assign temi = [] /> 
26 
27<#list categoryList as category> 
28    <#assign AssetVocabularyServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyServiceUtil"]> 
29    <#assign assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(category.getVocabularyId()) /> 
30    <#if assetVocabulary.getName() == "Temi"> 
31        <#assign temi = temi + [category] /> 
32    <#elseif assetVocabulary.getName() == "Rivolto a chi"> 
33        <#assign rivoltoAChi = rivoltoAChi + [category] /> 
34    </#if> 
35</#list> 
36 
37<#list temi as category> 
38    <#if category.getParentCategory()??> 
39        <#assign child = category.getName()/> 
40    <#else> 
41        <#assign parent = category.getName()/> 
42    </#if> 
43</#list> 
44 
45<style> 
46.header-title{ 
47    display:none; 
48
49.header-back-to{ 
50    display:none; 
51
52 
53.hide-content{ 
54    visibility:hidden; 
55    height : 0; 
56    padding: 0px !important; 
57
58</style> 
59 
60	<#assign iconClass = "far fa-bell"/> 
61	<#if TipologiaAggiornamento?? && TipologiaAggiornamento.getData() != ""> 
62		<!-- Icona e testo GENERICO --> 
63		<#if TipologiaAggiornamento.getData()?upper_case == 'GENERICO'> 
64			<#assign iconClass = "far fa-bell"/> 
65		</#if> 
66		<!-- Icona e testo AVVISO --> 
67		<#if TipologiaAggiornamento.getData()?upper_case == 'AVVISO'> 
68			<#assign iconClass = "far fa-bell"/> 
69		</#if> 
70		<!-- Icona e testo PROGETTO --> 
71		<#if TipologiaAggiornamento.getData()?upper_case == 'PROGETTO'> 
72			<#assign iconClass = "far fa-ruler-triangle"/> 
73		</#if> 
74		<!-- Icona e testo PUBBLICAZIONE --> 
75		<#if TipologiaAggiornamento.getData()?upper_case == 'PUBBLICAZIONE'> 
76			<#assign iconClass = "far fa-list-alt"/> 
77		</#if> 
78		<!-- Icona e testo DELIBERA --> 
79		<#if TipologiaAggiornamento.getData()?upper_case == 'DELIBERA'> 
80			<#assign iconClass = "far fa-newspaper"/> 
81		</#if> 
82	</#if> 
83<div class="rt-subheader rt-subheader--no-bg rt-subheader--updates"> 
84    <div class="rt-subheader__wrapper"> 
85        <div class="rt-container"> 
86            <div class="rt-subheader__content"> 
87				<div class="rt-subheader__taxonomy"> 
88					<strong class="rt-subheader__taxonomy-label"><i aria-hidden="true" class="${iconClass}"></i> Aggiornamento in: </strong> 
89					<#list temi as category> 
90						<#if category.getParentCategory()??> 
91							<#assign childCategory1 = category.getName()/> 
92							<#if parentCategory1??> 
93								<#if category.getParentCategory().getName() != parentCategory1> 
94									<i aria-hidden="true" class="fas fa-circle"></i> 
95									<#assign parentCategory1 = category.getParentCategory().getName()/> 
96									<span class="rt-subheader__taxonomy-main"> 
97										<a title="Vai alla categoria ${parentCategory1}" aria-label="Vai alla categoria ${parentCategory1}" href="/${parentCategory1?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
98											${parentCategory1} 
99										</a> 
100									</span> 
101								</#if> 
102							<#else> 
103								<#assign parentCategory1 = category.getParentCategory().getName()/> 
104								<span class="rt-subheader__taxonomy-main"> 
105									<a title="Vai alla categoria ${parentCategory1}" aria-label="Vai alla categoria ${parentCategory1}" href="/${parentCategory1?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
106										${parentCategory1} 
107									</a> 
108								</span> 
109							</#if> 
110							<span class="rt-subheader__taxonomy-secondary"> 
111								<a title="Vai alla categoria ${childCategory1}" aria-label="Vai alla categoria ${childCategory1}" href="/${childCategory1?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
112									${childCategory1} 
113								</a> 
114							</span> 
115						<#else> 
116							<#if parentCategory1??> 
117								<#if category.getName() != parentCategory1> 
118									<#assign parentCategory1 = category.getName()/> 
119									<i aria-hidden="true" class="fas fa-circle"></i> 
120									<span class="rt-subheader__taxonomy-main"> 
121										<a title="Vai alla categoria ${parentCategory1}" aria-label="Vai alla categoria ${parentCategory1}" href="/${parentCategory1?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
122											${parentCategory1} 
123										</a> 
124									</span> 
125								</#if> 
126							<#else> 
127								<#if category.getParentCategory()??> 
128									<#assign parentCategory1 = category.getParentCategory().getName()/> 
129									<span class="rt-subheader__taxonomy-main"> 
130										<a title="Vai alla categoria ${parentCategory1}" aria-label="Vai alla categoria ${parentCategory1}" href="/${parentCategory1?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
131											${parentCategory1} 
132										</a> 
133									</span> 
134								<#else> 
135									<#assign parentCategory1 = category.getName()/> 
136									<span class="rt-subheader__taxonomy-main"> 
137										<a title="Vai alla categoria ${parentCategory1}" aria-label="Vai alla categoria ${parentCategory1}" href="/${parentCategory1?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
138											${parentCategory1} 
139										</a> 
140									</span> 
141								</#if> 
142							</#if> 
143						</#if> 
144					</#list> 
145				</div> 
146 
147                <h2 class="rt-subheader__title">${.vars['reserved-article-title'].data} <@getEditIcon /> </h2> 
148                <div class="rt-subheader__text">${entry.getSummary(locale)}</div> 
149                <#if TipologiaAggiornamento?? && TipologiaAggiornamento.getData() != ""> 
150                    <div class="rt-subheader__category"> 
151                        <div class="rt-subheader__category-label">${TipologiaAggiornamento.getData()?upper_case}</div> 
152						<i aria-hidden="true" class="${iconClass}"></i> 
153                    </div> 
154                </#if> 
155                <div class="rt-btn rt-btn-light rt-btn-round rt-btn-share" id="sharebtn"> 
156                    <span class="rt-btn-round__label">Condividi</span> <i aria-hidden="true" class="fas fa-share"></i> 
157                </div> 
158            </div> 
159        </div> 
160    </div> 
161</div>     
162 
163<section class="container rt-content" id="content"> 
164    <div class="row"> 
165        <div class="col-md-8 portlet-column portlet-column-first" id="column-2"> 
166            <div class="rt-page__content rt-page-content--left"> 
167                <div class="rt-page__content-text"> 
168                    <#if TitoloSecondario?? && TitoloSecondario?has_content && TitoloSecondario.getData() != "" && TitoloSecondario.getData()?trim != ""> 
169                        <div class="rt-page__content-emphasis"> 
170                            ${TitoloSecondario.getData()} 
171                        </div>     
172                    </#if> 
173					<#if UsaImmagine?? && UsaImmagine.getData() == "true" > 
174						<#if ImmagineCopertina?? && ImmagineCopertina.getData()?? && ImmagineCopertina.getData() != ""> 
175							<div class="rt-page__content-main-image"> 
176								<#assign altImage = ""/> 
177								<#if ImmagineCopertina.getAttribute("alt")?? > 
178									<#assign altImage = ImmagineCopertina.getAttribute("alt") /> 
179								</#if> 
180 
181 
182								<img alt="${altImage}" src="${ImmagineCopertina.getData()}" /> 
183							</div> 
184						</#if> 
185					</#if> 
186                    <#if ContenutoPrincipale??> 
187						<@rt.pruneExternalContent html=ContenutoPrincipale.getData()?remove_beginning("<p>&nbsp;</p>") acceptedCookie=hasCookie?trim?boolean /> 
188					</#if> 
189                </div> 
190            </div> 
191 
192            <!-- TODO : INSERIRE PARTE MANCANTE --> 
193        </div> 
194		 
195        <@getLinkAndAllegati /> 
196 
197         <@getEbook /> 
198        
199		 
200    </div> 
201 
202<div class="col-md-12 portlet-column portlet-column-last" id="column-2"> 
203        <#if VideoGallery?? && VideoGallery.getData()?has_content> 
204            <#assign galleriaVideoJson = jsonFactoryUtil.createJSONObject(VideoGallery.getData()) /> 
205            <#assign classPKGalleriaVideo = galleriaVideoJson.getLong("classPK") /> 
206            <#if (classPKGalleriaVideo > 0)> 
207                <#assign galleriaVideoAsset = AssetEntryLocalServiceUtil.fetchEntry("com.liferay.journal.model.JournalArticle", classPKGalleriaVideo) /> 
208                <#if galleriaVideoAsset?? > 
209                    <#assign assetRendererGalleriaVideo = galleriaVideoAsset.getAssetRenderer() /> 
210                    <#assign articleGalleriaVideo = assetRendererGalleriaVideo.getArticle() />  
211                    <#assign articleContentVideo = journalContentUtil.getContent(articleGalleriaVideo.groupId, articleGalleriaVideo.articleId, "", locale.toString(), themeDisplay) /> 
212                     
213                    ${articleContentVideo} 
214                </#if> 
215            </#if>  
216        </#if> 
217 
218        <@getPhotogallery /> 
219 
220		 
221    </div> 
222 
223<div class="rt-update-informations"> 
224    <div class="rt-update-informations__row"> 
225 
226        <div class="rt-update-informations__info"> 
227            <i aria-hidden="true" class="far fa-code-branch"></i> 
228            <div class="rt-update-informations__info-label">Questo aggiornamento lo trovi in:</div> 
229            <div class="rt-update-informations__info-value"> 
230				<#list temi as category> 
231					<#if category.getParentCategory()??> 
232							<#assign childCategory = category.getName()/> 
233							<#if parentCategory??> 
234								<#if category.getParentCategory().getName() != parentCategory> 
235									<br> 
236									<#assign parentCategory = category.getParentCategory().getName()/> 
237									<a class="rt-update-informations__info-category" title="Vai alla categoria ${parentCategory}" aria-label="Vai alla categoria ${parentCategory}" href="/${parentCategory?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
238										<strong>${parentCategory}</strong> 
239									</a> 
240								</#if> 
241							<#else> 
242								<#assign parentCategory = category.getParentCategory().getName()/> 
243								<a class="rt-update-informations__info-category" title="Vai alla categoria ${parentCategory}" aria-label="Vai alla categoria ${parentCategory}" href="/${parentCategory?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
244									<strong>${parentCategory}</strong> 
245								</a> 
246							</#if> 
247							<a class="rt-update-informations__info-category" title="Vai alla categoria ${childCategory}" aria-label="Vai alla categoria ${childCategory}" href="/${childCategory?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
248								/${childCategory} 
249							</a> 
250					<#else> 
251						<#if parentCategory??> 
252							<#if category.getName() != parentCategory> 
253								<#assign parentCategory = category.getName()/> 
254								<br> 
255								<a class="rt-update-informations__info-category" title="Vai alla categoria ${parentCategory}" aria-label="Vai alla categoria ${parentCategory}" href="/${parentCategory?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
256									<strong>${parentCategory}</strong> 
257								</a> 
258							</#if> 
259						<#else> 
260							<#if category.getParentCategory()??> 
261								<#assign parentCategory = category.getParentCategory().getName()/> 
262								<a class="rt-update-informations__info-category" title="Vai alla categoria ${parentCategory}" aria-label="Vai alla categoria ${parentCategory}" href="/${parentCategory?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
263									<strong>${parentCategory}</strong> 
264								</a> 
265							<#else> 
266								<#assign parentCategory = category.getName()/> 
267								<a class="rt-update-informations__info-category" title="Vai alla categoria ${parentCategory}" aria-label="Vai alla categoria ${parentCategory}" href="/${parentCategory?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"> 
268									<strong>${parentCategory}</strong> 
269								</a> 
270							</#if> 
271						</#if> 
272					</#if> 
273				</#list> 
274			</div> 
275        </div> 
276 
277        <div class="rt-update-informations__info rt-update-informations__info--updated"> 
278            <i aria-hidden="true" class="far fa-calendar-edit"></i> 
279            <div class="rt-update-informations__info-label">Aggiornato al:</div> 
280            <div class="rt-update-informations__info-value"><strong>${article.modifiedDate?string["dd.MM.yyyy"]}</strong></div> 
281        </div> 
282 
283         <div class="rt-update-informations__info rt-update-informations__info--id"> 
284            <i aria-hidden="true" class="far fa-hashtag"></i> 
285            <div class="rt-update-informations__info-label">Article ID:</div> 
286            <div class="rt-update-informations__info-value"><strong>${article.getArticleId()}</strong></div> 
287        </div> 
288    </div> 
289 
290    <#if rivoltoAChi?? && (rivoltoAChi?size > 0) > 
291        <div class="rt-update-informations__info rt-update-informations__info--interest"> 
292            <i aria-hidden="true" class="far fa-user-friends"></i> 
293            <div class="rt-update-informations__info-label">Interessa a:</div> 
294            <div class="rt-update-informations__info-value"> 
295            <#list rivoltoAChi as category> 
296                <a class="rt-update-informations__info-category" title="Vai alla categoria ${category.getName()}" aria-label="Vai alla categoria ${category.getName()}" href="/${category.getName()?replace('\'', '-')?replace(' ', '-')?replace('à', 'a')?replace('ò', 'o')?replace('è', 'e')?replace('é', 'e')?replace('ù', 'u')?replace(',', '')?lower_case}"><strong>${category.getName()}</strong></a> 
297            </#list> 
298            </div> 
299        </div> 
300    </#if> 
301 
302</div> 
303 
304 
305</section> 
306 
307 
308<#macro getLinkAndAllegati> 
309	<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
310	<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
311	<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
312	 
313	<#assign currentArticle = JournalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
314	<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
315	<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
316	<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
317	<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
318 
319	<#assign hasAllegato = "false" /> 
320	<#assign hasLink = "false" /> 
321	<#if currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content> 
322		<#list currentArticleRelatedLinks as related_entry> 
323			<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
324			<#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
325			<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
326 
327			<#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' > 
328				<#assign hasAllegato = "true" /> 
329			<#elseif relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
330				<#assign hasLink = "true" /> 
331			</#if> 
332		</#list> 
333	</#if> 
334	<#if ((TitoloAllegato?? && TitoloAllegato.getData()?has_content && TitoloAllegato.getSiblings()?has_content) 
335		|| (hasAllegato == "true")) || ((TitoloLinkUtile?? && TitoloLinkUtile.getData()?has_content && TitoloLinkUtile.getSiblings()?has_content) 
336		|| (hasLink == "true")) > 
337		<div class="col-md-4 portlet-column portlet-column-last" id="column-3"> 
338			<#if (TitoloAllegato?? && TitoloAllegato.getData()?has_content && TitoloAllegato.getSiblings()?has_content) 
339				|| (hasAllegato == "true")> 
340				 
341				<div class="rt-section rt-section--sidebar" aria-label="Lista dei link utili"> 
342					<div class="rt-section-title-wrapper"> 
343						<h2 class="rt-section-title">Allegati</h2> 
344					</div> 
345 
346					<#if (TitoloAllegato?? && TitoloAllegato.getData()?has_content && TitoloAllegato.getSiblings()?has_content)> 
347 
348							<#assign allegati = docXml.getRootElement().selectNodes("//dynamic-element[@name='TitoloAllegato']") /> 
349							<#list allegati as allegatoXML> 
350							 
351								<#assign titoloAllegato = allegatoXML.elementText("dynamic-content") /> 
352								<#assign allegato = allegatoXML.valueOf("//dynamic-element[@name='Allegato']/dynamic-content/text()") /> 
353								 
354								<#assign subfields = allegatoXML.elements("dynamic-element")> 
355								<#list subfields as subfield > 
356									<#if subfield.attributeValue("name") == "Allegato" && titoloAllegato?? && titoloAllegato != ""> 
357										<#assign allegato = subfield.elementText("dynamic-content") /> 
358										<#assign json = jsonFactoryUtil.createJSONObject(allegato) /> 
359													 
360										<#assign nameImg = json.getString("name") /> 
361										<#assign altImg = json.getString("alt") /> 
362										<#assign fileEntryId = json.getLong("fileEntryId") /> 
363										<#assign uuiD = json.getString("uuid") /> 
364										<#assign groupId = json.getLong("groupId") /> 
365 
366										<#if fileEntryId != 0> 
367											<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) />  
368											<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
369										<#else> 
370											<#if groupId != 0 && uuiD != ""> 
371												<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) /> 
372												<#if fileEntry?? > 
373													<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
374												</#if> 
375											</#if> 
376										</#if> 
377										<div class="rt-box rt-box--link"> 
378											<div class="rt-box__header"> 
379												<div class="rt-box__wrapper"> 
380													<div class="rt-box__title"> 
381														<a target="_blank" href="${fileUrl}" aria-label="Vedi ${titoloAllegato?html}" title="Vedi ${titoloAllegato?html}"> 
382															${titoloAllegato?html} 
383														</a> 
384													</div> 
385												</div> 
386												<div class="rt-box__icon"> 
387													<i aria-hidden="true" class="far fa-download"></i> 
388												</div> 
389											</div> 
390										</div> 
391 
392									</#if> 
393								</#list>		 
394							</#list> 
395 
396						</#if> 
397 
398						<#if hasAllegato == "true"> 
399							<#list currentArticleRelatedLinks as related_entry> 
400								<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
401								<#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
402								<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
403 
404								<#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' > 
405									<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(relatedAssetEntryPrimKey) /> 
406									<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() /> 
407									<#if fileEntry?? && fileUrl != ""> 
408										<#if fileEntry.getExtension() == 'mp3'> 
409											<div class="rt-box rt-box--link rt-box--audio"> 
410												<div class="rt-box__header"> 
411													<div class="rt-box__wrapper"> 
412														<div class="rt-box__title"> 
413															<a title="Scarica ${fileEntry.getTitle()}" aria-label="Scarica ${fileEntry.getTitle()}" href="${fileUrl}" target="_blank"> 
414																${fileEntry.getTitle()} 
415															</a> 
416														</div> 
417														<audio controls> 
418															<source src="${fileUrl}" type="audio/ogg"> 
419															<source src="${fileUrl}" type="audio/mpeg"> 
420																Il tuo browser non supporta questo tipo di oggetto html 
421														</audio> 
422													</div> 
423												</div> 
424											</div> 
425										<#else> 
426											<div class="rt-box rt-box--link"> 
427												<div class="rt-box__header"> 
428													<div class="rt-box__wrapper"> 
429														<div class="rt-box__title"> 
430															<a target="_blank" href="${fileUrl}" aria-label="Vedi ${fileEntry.getTitle()}" title="Vedi ${fileEntry.getTitle()}"> 
431																${fileEntry.getTitle()} 
432															</a> 
433														</div> 
434													</div> 
435 
436													<div class="rt-box__icon"> 
437														<i aria-hidden="true" class="far fa-download"></i> 
438													</div> 
439												</div> 
440											</div> 
441										</#if> 
442									</#if> 
443								</#if> 
444							</#list> 
445						</#if> 
446 
447 
448				</div> 
449 
450			</#if>  
451			<#if (TitoloLinkUtile?? && TitoloLinkUtile.getData()?has_content && TitoloLinkUtile.getSiblings()?has_content) 
452				|| (hasLink == "true") > 
453 
454				 
455				<div class="rt-section rt-section--sidebar" aria-label="Lista dei link utili"> 
456					<div class="rt-section-title-wrapper"> 
457						<h2 class="rt-section-title">Link</h2> 
458					</div> 
459						 
460						<#if (TitoloLinkUtile?? && TitoloLinkUtile.getData()?has_content && TitoloLinkUtile.getSiblings()?has_content)> 
461 
462							<#assign links = docXml.getRootElement().selectNodes("//dynamic-element[@name='TitoloLinkUtile']") /> 
463							<#list links as linkXML> 
464								<#assign titoloLink = linkXML.elementText("dynamic-content") /> 
465								<#assign link = linkXML.valueOf("//dynamic-element[@name='Link']/dynamic-content/text()") /> 
466								 
467								<#assign subfields = linkXML.elements("dynamic-element")> 
468								<#list subfields as subfield > 
469									<#if subfield.attributeValue("name") == "Link" && titoloLink?? && titoloLink != ""> 
470										<#assign link = subfield.elementText("dynamic-content") /> 
471										<div class="rt-box rt-box--link"> 
472											<div class="rt-box__header"> 
473												<div class="rt-box__wrapper"> 
474													<div class="rt-box__title"> 
475														<#if link?html?starts_with("www")> 
476															<a target="_blank" href="//${link?html}" aria-label="Vedi ${titoloLink?html}" title="Vedi ${titoloLink?html}"> 
477																${titoloLink?html} 
478															</a> 
479														<#else> 
480															<a target="_blank" href="${link?html}" aria-label="Vedi ${titoloLink?html}" title="Vedi ${titoloLink?html}"> 
481																${titoloLink?html} 
482															</a> 
483														</#if> 
484														 
485													</div> 
486												</div> 
487 
488												<div class="rt-box__icon"> 
489													<i aria-hidden="true" class="far fa-link"></i> 
490												</div> 
491											</div> 
492										</div> 
493 
494										 
495									</#if>                             
496								</#list> 
497							</#list> 
498 
499							 
500						</#if> 
501						 
502						 
503						<#if hasLink == "true"> 
504							<#list currentArticleRelatedLinks as related_entry> 
505								<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
506								<#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
507								<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
508 
509								<#if relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
510									<#assign relatedArticle = JournalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
511									<#if relatedArticle?? && relatedArticle != ""> 
512										<div class="rt-box rt-box--link"> 
513											<div class="rt-box__header"> 
514												<div class="rt-box__wrapper"> 
515													<div class="rt-box__title"> 
516														<a target="_blank" href="/-/${relatedArticle.getUrlTitle()}" aria-label="Vedi ${relatedArticle.getTitle()}" title="Vedi ${relatedArticle.getTitle()}"> 
517															${relatedArticle.getTitle()} 
518														</a> 
519													</div> 
520												</div> 
521 
522												<div class="rt-box__icon"> 
523													<i aria-hidden="true" class="far fa-link"></i> 
524												</div> 
525											</div> 
526										</div> 
527									</#if> 
528								</#if> 
529							</#list> 
530						</#if> 
531				</div> 
532			</#if> 
533		    
534		</div> 
535	</#if> 
536</#macro> 
537 
538<#macro getPhotogallery> 
539    <#if (FotoGallery?? && FotoGallery.getData()?has_content && FotoGallery.getSiblings()?has_content)> 
540        <#assign galleries = docXml.getRootElement().selectNodes("//dynamic-element[@name='FotoGallery']") /> 
541        <#list galleries as galleryXML> 
542 
543            <#assign gallery = galleryXML.elementText("dynamic-content") /> 
544            <#if gallery?? > 
545                <#assign galleriaFotoJson = jsonFactoryUtil.createJSONObject(gallery) /> 
546                <#assign classPKGalleriaFoto = galleriaFotoJson.getLong("classPK") /> 
547                <#if (classPKGalleriaFoto > 0)> 
548                    <#assign galleriaFotoAsset = AssetEntryLocalServiceUtil.fetchEntry("com.liferay.journal.model.JournalArticle", classPKGalleriaFoto) /> 
549                    <#if galleriaFotoAsset?? > 
550                        <#assign assetRendererGalleriaFoto = galleriaFotoAsset.getAssetRenderer() /> 
551                        <#assign articleGalleriaFoto = assetRendererGalleriaFoto.getArticle() />  
552                        <#assign articleContentFoto = journalContentUtil.getContent(articleGalleriaFoto.groupId, articleGalleriaFoto.articleId, "", locale.toString(), themeDisplay) /> 
553                         
554                        ${articleContentFoto} 
555                    </#if> 
556                </#if>  
557            </#if> 
558        </#list> 
559    </#if> 
560</#macro> 
561 
562<#macro getEbook> 
563 
564	<#if (TitoloEbook?? && TitoloEbook.getData()?has_content && TitoloEbook.getSiblings()?has_content)> 
565		<div class="col-md-4 portlet-column portlet-column-last" id="column-3"> 
566		<div class="rt-section rt-section--sidebar" aria-label="Lista dei link utili"> 
567			<div class="rt-section-title-wrapper"> 
568				<h2 class="rt-section-title">Ebook</h2> 
569			</div> 
570				 
571				<#if (TitoloEbook?? && TitoloEbook.getData()?has_content && TitoloEbook.getSiblings()?has_content)> 
572 
573					<#assign ebooks = docXml.getRootElement().selectNodes("//dynamic-element[@name='TitoloEbook']") /> 
574					<#list ebooks as ebookXML> 
575					 
576						<#assign titoloEbook = ebookXML.elementText("dynamic-content") /> 
577						<#assign ebook = ebookXML.valueOf("//dynamic-element[@name='Ebook']/dynamic-content/text()") /> 
578						 
579						<#assign subfields = ebookXML.elements("dynamic-element")> 
580						<#list subfields as subfield > 
581							<#if subfield.attributeValue("name") == "Ebook" && titoloEbook?? && titoloEbook != ""> 
582								<#assign ebook = subfield.elementText("dynamic-content") /> 
583								<#assign json = jsonFactoryUtil.createJSONObject(ebook) /> 
584											 
585								<#assign nameImg = json.getString("name") /> 
586								<#assign altImg = json.getString("alt") /> 
587								<#assign fileEntryId = json.getLong("fileEntryId") /> 
588								<#assign uuiD = json.getString("uuid") /> 
589								<#assign groupId = json.getLong("groupId") /> 
590 
591								<#if fileEntryId != 0> 
592									<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) />  
593									<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
594								<#else> 
595									<#if groupId != 0 && uuiD != ""> 
596										<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) /> 
597										<#if fileEntry?? > 
598											<#assign fileUrl = "/o/pdfjs/web/viewer.jsp?file=/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
599										</#if> 
600									</#if> 
601								</#if> 
602								<div class="rt-box rt-box--link"> 
603									<div class="rt-box__header"> 
604										<div class="rt-box__wrapper"> 
605											<div class="rt-box__title"> 
606												<a target="_blank" href="${fileUrl}" aria-label="Vedi ${titoloEbook?html}" title="Vedi ${titoloEbook?html}"> 
607													${titoloEbook?html} 
608												</a> 
609											</div> 
610										</div> 
611										<div class="rt-box__icon"> 
612											<i aria-hidden="true" class="far fa-download"></i> 
613										</div> 
614									</div> 
615								</div> 
616 
617							</#if> 
618						</#list>		 
619					</#list> 
620 
621				</#if> 
622		</div> 
623		</div> 
624	</#if> 
625 
626</#macro> 
627 
628 
629<#macro getEditIcon> 
630	<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
631        <#if renderResponse?? > 
632            <#assign redirectURL = renderResponse.createRenderURL() /> 
633 
634            ${redirectURL.setParameter("mvcPath", "/add_asset_redirect.jsp")} 
635            ${redirectURL.setWindowState("pop_up")} 
636 
637            <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
638 
639            <#if validator.isNotNull(editPortletURL)> 
640                <#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) /> 
641 
642                <@liferay_ui["icon"] 
643                    cssClass="icon-monospaced visible-interaction" 
644                    icon="pencil" 
645                    markupView="lexicon" 
646                    message=title 
647                    url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
648                /> 
649            </#if> 
650        </#if>     
651	</#if> 
652</#macro>