Asset Publisher

An error occurred while processing the template.
The following has evaluated to null or missing:
==> tomApi.getJsonOffersListResultByMunicipalities(municipalityNames, lang)  [in template "20099#20135#33911" at line 584, column 25]

----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign offerResults = tomApi.getJson...  [in template "20099#20135#33911" at line 584, column 1]
----
1<#--ITINERARIO 21092021--> 
2<#assign structureService = serviceLocator.findService("it.inera.structure.service.StructureService")> 
3<#assign itinerarioStructureKey = structureService.getStructureItinerarioKey()> 
4<#assign itinerarioStructureId = structureService.getStructureItinerarioId()> 
5<#assign elasticService = serviceLocator.findService("it.inera.elastic.service.ElasticService")> 
6<#assign journalArticleId = .vars['reserved-article-id'].data/> 
7 
8<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
9<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
10<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
11 
12<#-- GESTIONE RALATED ASSETS IMPORTS--> 
13<#assign journalArticleConverter = serviceLocator.findService("it.inera.journalarticleconverter.service.JournalArticleConverter")> 
14<#assign searchService = serviceLocator.findService("it.inera.structure.search.service.SearchService")> 
15<#-- FINE GESTIONE RALATED ASSETS IMPORTS--> 
16 
17<#assign vocabularyIdUmbria = structureService.getVocabularyIdByVocabularyName("Vocabolario Umbria") > 
18 
19<#if coordinate_principali.getData()?has_content && coordinate_principali.getData()?trim?length gt 0 > 
20	<#assign coordinatePrincipaliJson = coordinate_principali.getData()?eval > 
21	<#if coordinatePrincipaliJson.latitude?has_content && coordinatePrincipaliJson.latitude?trim?length gt 0 > 
22		<#assign latitude = coordinatePrincipaliJson.latitude?c > 
23	</#if> 
24	<#if coordinatePrincipaliJson.longitude?has_content && coordinatePrincipaliJson.longitude?trim?length gt 0 > 
25		<#assign longitude = coordinatePrincipaliJson.longitude?c > 
26	</#if> 
27<#else> 
28	<#assign latitude = "" > 
29	<#assign longitude = "" > 
30</#if> 
31 
32<#assign currentArticle = journalArticleLocalService.getArticle(groupId, journalArticleId) /> 
33 
34<#-- GESTIONE RALATED ASSETS VALORIZZAZIONE ARRAY--> 
35<#assign currentObject = journalArticleConverter.getItinerario(currentArticle, themeDisplay.getLocale())> 
36<#assign relatedAssets = currentObject.getDirectRelatedAssets()> 
37<#assign relatedResults = []> 
38<#if relatedAssets?? && relatedAssets?has_content> 
39	<#assign relatedResult = searchService.getResponse(relatedAssets, themeDisplay.getLocale(), null, themeDisplay)> 
40	<#if relatedResult?? && relatedResult?has_content> 
41	<#assign relatedResults = relatedResult.getData()> 
42	</#if> 
43</#if> 
44<#-- GESTIONE RALATED ASSETS VALORIZZAZIONE ARRAY--> 
45 
46<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
47<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
48<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
49 
50<#assign categoryList = assetCategoryLocalService.getAssetEntryAssetCategories(currentArticleAssetEntryId) > 
51 
52<#assign vocabularyIdTerritori = structureService.getVocabularyIdByVocabularyName("Territori") > 
53<#assign categoryListIds = [] > 
54<#assign municipalityNames = [] > 
55<#assign municipalityNamesString = "" > 
56<#assign isTerritorio = false > 
57<#assign territoryNameString = "" > 
58 
59<#assign hasTappe = false > 
60<#if tappa.getData()?has_content> 
61	<#list tappa.getSiblings() as cur_tappa>  
62		<#if cur_tappa.titolo_tappa.getData()?has_content> 
63			<#assign hasTappe = true > 
64		</#if> 
65	</#list> 
66</#if> 
67 
68<#list categoryList as category> 
69	<#if vocabularyIdUmbria == category.getVocabularyId() > 
70		<#assign categoryListIds = categoryListIds + [category.getCategoryId()]> 
71	</#if> 
72</#list> 
73 
74 
75<#list categoryList as category> 
76	<#if vocabularyIdTerritori == category.getVocabularyId() > 
77		<#assign municipalityName = category.getTitle(themeDisplay.getLanguageId()) > 
78 
79		<#assign childCategories = assetCategoryLocalService.getChildCategories(category.getCategoryId()) > 
80		<#if childCategories?has_content>  
81			<#assign territoryNameString = category.getTitle(themeDisplay.getLanguageId())> 
82			<#list childCategories as curChildCategory>  
83				<#assign isTerritorio = true > 
84				<#assign municipalityNameC = curChildCategory.getTitle(themeDisplay.getLanguageId()) > 
85				<#if curChildCategory?counter != 1 || municipalityNamesString?has_content> 
86					<#assign municipalityNamesString = municipalityNamesString + "," + municipalityNameC> 
87				<#else> 
88					<#assign municipalityNamesString = municipalityNamesString + municipalityNameC> 
89				</#if> 
90				<#assign municipalityNames = municipalityNames + [municipalityNameC]> 
91			</#list>  
92		<#else> 
93			<#assign municipalityNames = municipalityNames + [municipalityName]> 
94			<#if municipalityNamesString?has_content> 
95				<#assign municipalityNamesString = municipalityNamesString + "," + municipalityName> 
96			<#else> 
97				<#assign municipalityNamesString = municipalityNamesString + municipalityName> 
98			</#if> 
99		</#if> 
100	</#if> 
101</#list> 
102 
103<#assign results = elasticService.getRelatedArticlesOrderByPriority(themeDisplay, latitude, longitude, "100", itinerarioStructureKey, itinerarioStructureId?c, locale, "6", null , categoryListIds, journalArticleId, null, null, null) /> 
104 
105<#-- per categoria --> 
106 
107<#assign categoryArray=[]> 
108<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
109<#assign vocabularyName = "Vocabolario Umbria"/> 
110<#assign specificVocabulary = assetVocabularyLocalService.getGroupVocabulary(themeDisplay.getCompany().getGroupId(), vocabularyName)/> 
111<#if validator.isNotNull(specificVocabulary)> 
112    <#assign cats = specificVocabulary.getCategories()/> 
113</#if> 
114 
115<#assign categories = assetCategoryLocalService.getAssetEntryAssetCategories(currentArticleAssetEntryId) /> 
116<#if validator.isNotNull(cats)> 
117    <#list cats as cat> 
118        <#list categories as cate> 
119            <#if cat == cate> 
120                <#assign categoryArray = categoryArray + [cat]> 
121            </#if> 
122        </#list> 
123    </#list> 
124</#if> 
125 
126<#--<#if categoryArray?? && categoryArray?has_content> 
127    <#assign firstCategory = categoryArray[0] /> 
128    <#assign titleCategory = firstCategory.getTitle(themeDisplay.getLocale())> 
129</#if>--> 
130 
131<#-- per categoria FINE --> 
132 
133<#assign widthBannerImg = propsUtil.get("image.scale.fullpage") /> 
134<#assign widthSliderTappaImg = propsUtil.get("image.slider.testobarra.height") /> 
135<#assign widthSliderImg = propsUtil.get("image.slider.testobarra.height") /> 
136<#assign widthCardImg = propsUtil.get("image.scale.allpage") /> 
137<#assign tomBaseImagePath = propsUtil.get("tom.base.image.url") /> 
138 
139 
140<div class="container-fluid"> 
141    <div class="row"> 
142        <div class="header-block header-block-1 header-block-image-main header-block-tagged"> 
143         
144            <#assign linkImmagineB = ""> 
145        	<#if immagine_banner.getData()?contains("?")> 
146				<#assign linkImmagineB = immagine_banner.getData() + "&width=" + widthBannerImg >  
147			<#else> 
148				<#assign linkImmagineB = immagine_banner.getData() + "?width=" + widthBannerImg >  
149			</#if> 
150																	 
151            <img class="bg" src="${linkImmagineB}" alt="${testo_alternativo_immagine_banner.getData()}"> 
152            <div class="container title title-main"> 
153                <div class="row"> 
154                    <div class="col-12"> 
155	                    <#list categoryList as category> 
156							<#if vocabularyIdUmbria == category.getVocabularyId() > 
157								<#assign titleCategory = category.getTitle(themeDisplay.getLocale())> 
158								<#if titleCategory?? && titleCategory?has_content> 
159                            		<div class="badge badge-light badge-uppercase"> 
160                                		${titleCategory} 
161                            		</div>   
162                        		</#if> 
163							</#if> 
164						</#list> 
165                        <h1 class="title-1 text-weight-300 margin-top-em-0 margin-bottom-em-0"> 
166                            ${titolo.getData()} 
167                        </h1> 
168                    </div> 
169                </div> 
170            </div> 
171        </div> 
172    </div> 
173</div> 
174<#assign categoryArray=[]> 
175 
176 
177<#assign count = 0 /> 
178<#if dati_tecnici_chiave?? && dati_tecnici_chiave?has_content > 
179    <#list dati_tecnici_chiave.getSiblings() as cur_dati_tecnici_chiave>  
180        <#if cur_dati_tecnici_chiave.dati_tecnici_valore?? && cur_dati_tecnici_chiave.dati_tecnici_valore.getData()?has_content > 
181            <#assign count = count + 1 /> 
182        </#if> 
183    </#list>  
184</#if> 
185 
186<#if count gt 0 > 
187    <#assign dividendo = 12/count /> 
188</#if> 
189 
190<div class="container-fluid bg-white"> 
191    <#if count gt 0 && count lt 4> 
192        <div class="row flex-column-reverse flex-lg"> 
193            <div class="container bridge bridge-top"> 
194                <div class="row"> 
195                    <div class="col-12"> 
196                        <div class="card-bar card-bar-1 card-bar-dark"> 
197                            <div class="card-row"> 
198                                <#list dati_tecnici_chiave.getSiblings() as cur_dati_tecnici_chiave> 
199                                    <div class="col-${dividendo}"> 
200                                        <div class="card card-horizontal card-3"> 
201                                            <div class="card-row"> 
202                                                <div class="card-icon card-item-first"> 
203                                                    <i class="fas ${cur_dati_tecnici_chiave.dati_tecnici_icona.getData()}"></i> 
204                                                </div> 
205                                                <div class="card-body"> 
206                                                    <div class="row"> 
207                                                        <div class="col-12"> 
208                                                            <div class="card-subtitle title-6"> 
209                                                                ${cur_dati_tecnici_chiave.getData()} 
210                                                            </div> 
211                                                        </div> 
212                                                        <div class="col-12"> 
213                                                            <div class="card-title"> 
214                                                                ${cur_dati_tecnici_chiave.dati_tecnici_valore.getData()} 
215                                                            </div> 
216                                                        </div> 
217                                                    </div> 
218                                                </div> 
219                                            </div> 
220                                        </div> 
221                                    </div> 
222                                </#list> 
223                            </div> 
224                        </div> 
225                    </div> 
226                </div> 
227            </div> 
228        </div> 
229    </#if> 
230     
231    <div class="row"> 
232        <article class="container padding-bottom-em-3"> 
233            <div class="row"> 
234             
235          		<div class="col-12"> 
236          		    <div class="text-left link-back-container margin-left-rem-1"><a class="link-1 link-back margin-top-em-2 padding-left-rem-1" id="backLink" href="#"><i class="im im-angle-left"></i><span class="hidden display-inline-lg"><@liferay.language key="label.indietro" /></span></a></div>   
237            		<div class="text-center padding-top-em-2"> 
238              			<div class="link-1 link-toggle-map"></div> 
239            		</div> 
240            		<div class="link-tripplanner-container"> 
241                		<#assign currentUrl = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() /> 
242              			<a data-id="${journalArticleId}" class="link link-tripplanner link-tripplanner-extended link-tripplanner-top-right margin-right-em-1 padding-right-rem-1" href="${currentUrl}" data-tom="false"> 
243                			<i class="far fa-heart text-red"></i> 
244                			<i class="fas fa-heart text-red" style="display:none"></i> 
245                			<span class="label hidden display-inline-lg"><@liferay.language key="label.aggiungi.al.mio.viaggio" /></span> 
246              			</a> 
247            		</div> 
248      			</div> 
249 
250             
251                <div class="col-12 col-md-8"> 
252                    <div class="text-block text-block-left"> 
253                        <div class="title-4 padding-bottom-em-1 mt-5 e mt-lg-0"> 
254                            ${sottotitolo.getData()} 
255                        </div> 
256                        <div class="text"> 
257                            ${descrizione.getData()} 
258                        </div> 
259                        <#if hasTappe?c = "false"> 
260                        	<br> 
261			            	<#if validator.isNotNull(descrizione_due.getData()) && descrizione_due.getData() != '<p>null</p>'> 
262                            	<div class="text"> 
263                                	${descrizione_due.getData()} 
264                            	</div> 
265			            	</#if> 
266                        </#if> 
267                    </div> 
268                </div> 
269                 
270                 
271                <#assign fileKml = "" /> 
272                <#assign checkFileKml = false /> 
273                <#assign urlFileKml = "" /> 
274                 
275                <#assign fileGps = "" /> 
276                <#assign checkFileGps = false /> 
277                <#assign urlFileGps = "" /> 
278                 
279                <#assign countFile = 0 /> 
280                <#if file_tecnici?? && file_tecnici?has_content>  
281                    <#list file_tecnici.getSiblings() as cur_file_tecnici>  
282                        <#if cur_file_tecnici.file.getData()?? && cur_file_tecnici.file.getData()?has_content > 
283                             
284                            <#assign counter = 0 > 
285                             
286                            <#list cur_file_tecnici.file.getData()?split("/") as x> 
287                                <#if counter == 2> 
288                                    <#assign groupIdd = x?number > 
289                                </#if> 
290                                <#if counter == 5> 
291                                    <#assign uuId = x > 
292                                    <#if uuId?contains("?t=") > 
293                                        <#assign uuid = uuId?keep_before("?t=") /> 
294                                    </#if> 
295                                </#if> 
296                                <#assign counter = counter + 1 > 
297                            </#list> 
298                             
299                            <#assign fileEntry = serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryLocalService') />  
300                            <#assign file=fileEntry.getFileEntryByUuidAndGroupId(uuid,groupIdd) > 
301                             
302                            <#if file.getExtension() == "kml" > 
303                                <#assign fileKml = file /> 
304                                <#assign checkFileKml = true /> 
305                                <#assign countFile = countFile - 1 />  
306                                <#assign urlFileKml = "/documents/"+ fileKml.getGroupId() +"/" +fileKml.getClassPK() +"/"+ fileKml.getTitle() +"/"+fileKml.getUuid() > 
307                            </#if> 
308                             
309                            <#if file.getExtension() == "gpx" > 
310                                <#assign fileGps = file /> 
311                                <#assign checkFileGps = true /> 
312                                <#assign urlFileGps = "/documents/"+ fileGps.getGroupId() +"/" +fileGps.getClassPK() +"/"+ fileGps.getTitle() +"/"+fileGps.getUuid() > 
313                            </#if> 
314                             
315                            <#assign countFile = countFile + 1 />  
316                        </#if> 
317                    </#list>  
318                </#if> 
319 
320                <#if countFile gt 0> 
321                    <aside class="col-12 col-md-4 margin-top-em-3 margin-top-md-em-0"> 
322                        <div class="text-block text-block-1"> 
323                            <div class="link-sidebar link-sidebar-1"> 
324                                <div class="title"> 
325                                    <@liferay.language key="label.download"/> 
326                                </div> 
327                                <ul class="link-list"> 
328                                    <#list file_tecnici.getSiblings() as cur_file_tecnici> 
329                                        <#if !cur_file_tecnici.getData()?contains("kml")>  
330                                            <li class="link-container"> 
331                                                <a class="link" href="${cur_file_tecnici.file.getData()}"> 
332                                                    <i class="fas fa-angle-right"></i> 
333                                                    <span class="label"> 
334                                                        ${cur_file_tecnici.getData()} 
335                                                    </span> 
336                                                </a> 
337                                            </li> 
338                                        </#if> 
339                                    </#list> 
340                                </ul> 
341                            </div> 
342                        </div> 
343                    </aside> 
344                </#if> 
345            </div> 
346        </article> 
347    </div> 
348</div> 
349 
350<#-- <#if tappa.getData()?has_content> --> 
351    <div class="container-fluid"> 
352        <div class="row"> 
353            <div class="map map-container map-banner"> 
354                <div class="map-content"> 
355                    <div class="leaflet-interactive-map map-summary-itinerary" id="map-itinerary" data-kml="${urlFileKml}" data-gpx="${urlFileGps}"></div> 
356                </div> 
357            </div> 
358        </div> 
359    </div> 
360    <#if (coordinate_principali.getData() != "")>  
361        <#assign geolocationJSONObject = jsonFactoryUtil.createJSONObject(coordinate_principali.getData())>  
362        <#assign latitudine = geolocationJSONObject.getDouble("latitude")>  
363        <#assign longitudine = geolocationJSONObject.getDouble("longitude")>  
364        <div class="itinerary-stage" id="" data-lat="${latitudine}" data-lng="${longitudine}" data-info="${titolo.getData()}" style="display:none;"> 
365        </div> 
366    </#if> 
367	<#-- <#else> 
368    <#assign latitude = 0>  
369    <#assign longitude = 0>  
370    <#if (coordinate_principali.getData() != "")>  
371        <#assign geolocationJSONObject = jsonFactoryUtil.createJSONObject(coordinate_principali.getData())>  
372        <#assign latitude = geolocationJSONObject.getDouble("latitude")>  
373        <#assign longitude = geolocationJSONObject.getDouble("longitude")>  
374    </#if> 
375     
376    <div class="container-fluid"> 
377        <div class="row"> 
378            <div class="map map-container map-banner"> 
379                <div class="map-content"> 
380                    <div class="leaflet-interactive-map map-summary-results" id="map-header" data-results="${themeDisplay.getPortalURL()}/o/geolocation/get-positions?articleId=${journalArticleId}&languageId=${themeDisplay.getLanguageId()}" data-config="{&quot;clustering&quot;:true}"></div> 
381                </div> 
382            </div> 
383        </div> 
384    </div> 
385</#if> --> 
386 
387<#if tappa.getData()?has_content> 
388    <div class="container-fluid bg-white"> 
389        <div class="row padding-top-em-5"> 
390            <div class="container"> 
391                <div class="row"> 
392                    <div class="col-12 col-md-10 col-lg-8"> 
393                        <#list tappa.getSiblings() as cur_tappa>  
394                            <#assign latitude = 0>  
395                            <#assign longitude = 0>  
396                             
397                            <#--CICLO COORDINATE TAPPA--> 
398						    <#assign coords = []> 
399						    <#assign coordsObj = ""> 
400						    <#if (cur_tappa?has_content && cur_tappa.comune?has_content && cur_tappa.comune.geolocalizzazione?has_content && cur_tappa.comune.geolocalizzazione.getData() != "" && cur_tappa.comune.geolocalizzazione.getData()?has_content)>  
401						    	<#list cur_tappa.comune.getSiblings() as comune_tappa>  
402						    		 
403						    		<#if comune_tappa?has_content && comune_tappa.geolocalizzazione?has_content && comune_tappa.geolocalizzazione.getData()?has_content> 
404						    		 
405							    		<#assign geolocationJSONObject = jsonFactoryUtil.createJSONObject(comune_tappa.geolocalizzazione.getData())>  
406							    		<#assign latitude = geolocationJSONObject.getDouble("latitude")>  
407							        	<#assign longitude = geolocationJSONObject.getDouble("longitude")>  
408							        	 
409							        	<#assign info = "">  
410							            <#if (comune_tappa.via_piazza?has_content && comune_tappa.via_piazza.getData() != "")>  
411							            	<#assign info = info + comune_tappa.via_piazza.getData()>  
412							            </#if> 
413							             
414							            <#if (comune_tappa.localita?has_content && comune_tappa.localita.getData() != "")>  
415							            	<#assign info = info + " " + comune_tappa.localita.getData()>  
416							            </#if> 
417							             
418							            <#if (comune_tappa.cap?has_content && comune_tappa.cap.getData() != "")>  
419							            	<#assign info = info + " " + comune_tappa.cap.getData()>  
420							            </#if> 
421							             
422							            <#if (comune_tappa.getData() != "")>  
423							            	<#assign info = info + " " + comune_tappa.getData()>  
424							            </#if> 
425							        	 
426							        	<#assign info = info?replace("\"","&quot;")> 
427							        	<#assign info = info?replace("'","&#39;")> 
428							        	 
429							        	<#assign coord = {"lat" : latitude, "lng" : longitude, "info": info}> 
430							        	<#assign coords = coords + [coord]> 
431						        	 
432						        	</#if> 
433						    	 
434						    	</#list>  
435						    	<#assign coordsObj = jsonFactoryUtil.looseSerializeDeep(coords)>  
436						    </#if> 
437						    <#--FINE CICLO COORDINATE TAPPA--> 
438                             
439                            <#if (cur_tappa?has_content &&  
440                            cur_tappa.comune?has_content &&  
441                            cur_tappa.comune.geolocalizzazione?has_content &&  
442                            cur_tappa.comune.geolocalizzazione.getData() != "")>  
443                                <#assign geolocationJSONObject = jsonFactoryUtil.createJSONObject(cur_tappa.comune.geolocalizzazione.getData())>  
444                                <#assign latitude = geolocationJSONObject.getDouble("latitude")>  
445                                <#assign longitude = geolocationJSONObject.getDouble("longitude")>  
446                            </#if> 
447                             
448                            <#assign info = "">  
449                             
450                            <#if (cur_tappa?has_content && cur_tappa.comune?has_content && cur_tappa.comune.via_piazza?has_content &&  
451                            cur_tappa.comune.via_piazza.getData() != "")>  
452                            	<#assign info = info + cur_tappa.comune.via_piazza.getData()>  
453                            </#if> 
454                             
455                            <#if (cur_tappa?has_content && cur_tappa.comune?has_content && cur_tappa.comune.localita?has_content &&  
456                            cur_tappa.comune.localita.getData() != "")>  
457                            	<#assign info = info + " " + cur_tappa.comune.localita.getData()>  
458                            </#if> 
459                             
460                            <#if (cur_tappa?has_content && cur_tappa.comune?has_content && cur_tappa.comune.cap?has_content &&  
461                            cur_tappa.comune.cap.getData() != "")>  
462                            	<#assign info = info + " " + cur_tappa.comune.cap.getData()>  
463                            </#if> 
464                             
465                            <#if (cur_tappa?has_content && cur_tappa.comune?has_content &&  cur_tappa.comune.getData() != "")>  
466                            	<#assign info = info + " " + cur_tappa.comune.getData()>  
467                            </#if> 
468                             
469                            <div class="itinerary-stage" id="${cur_tappa.titolo_tappa.getData()?replace(" ","-")}" data-lat="${latitude}" data-lng="${longitude}" data-info="${info}" data-coords='${coordsObj}'> 
470                                <div class="row"> 
471                                    <div class="col-2"> 
472                                        <div class="itinerary-sidebar"> 
473                                            <div class="marker"> 
474                                                <img src="/o/umbria-theme/images/icons/leaflet/marker-icon.svg" alt="Marker"> 
475                                                <div class="marker-label text-red">${cur_tappa.getData()}</div> 
476                                            </div> 
477                                            <div class="track"></div> 
478                                        </div> 
479                                    </div> 
480                                    <div class="col-10"> 
481                                        <div class="itinerary-body padding-bottom-em-5"> 
482                                            <div class="title">${cur_tappa.titolo_tappa.getData()}</div> 
483                                            <#if cur_tappa.titolo_immagine_tappa.getData()?has_content> 
484                                                <div class="image-container" style="margin-bottom:3rem;"> 
485                                                    <div class="carousel-container transparent"> 
486                                                        <div class="tns-carousel tns-carousel-default" data-tns-config="{&quot;items&quot;:1,&quot;autoplay&quot;:true,&quot;autoplayHoverPause&quot;:true,&quot;autoplayButtonOutput&quot;:false,&quot;speed&quot;:1000}"> 
487                                                            <#list cur_tappa.titolo_immagine_tappa.getSiblings() as titolo_immagine_tappa>  
488                                                                <div> 
489                                                                	<#assign linkImmagine = ""> 
490									                            	<#if titolo_immagine_tappa.immagine_tappa.getData()?contains("?")> 
491																		<#assign linkImmagine = titolo_immagine_tappa.immagine_tappa.getData() + "&width=" + widthSliderTappaImg >  
492																	<#else> 
493																		<#assign linkImmagine = titolo_immagine_tappa.immagine_tappa.getData() + "?width=" + widthSliderTappaImg >  
494																	</#if> 
495                                                                 
496                                                                    <img class="slide-image" src="${linkImmagine}" alt="${titolo_immagine_tappa.testo_alternativo_tappa.getData()}"> 
497                                                                    <p class="caption" style="margin-bottom: 12px;">${titolo_immagine_tappa.didascalia_immagine_tappa.getData()}</p> 
498                                                                </div>  
499                                                            </#list>  
500                                                        </div> 
501                                                    </div> 
502                                                </div> 
503                                            </#if> 
504                                            <#if cur_tappa.descrizione_tappa.getData()?has_content> 
505	                                            <div class="text-block-expandable"> 
506	                                            	<div class="text"> 
507	                                                	${cur_tappa.descrizione_tappa.getData()} 
508	                                                </div> 
509	                                            </div> 
510	                                            <div class="margin-top-em-2 btn btn-flat btn-default btn-small btn-text-block-expand show-more" data-showmore="<@liferay.language key="label.leggi.di.piu" />" data-showless="<@liferay.language key="label.leggi.di.meno" />"><@liferay.language key="label.leggi.di.piu" /></div> 
511                                        	</#if> 
512                                        </div> 
513                                    </div> 
514                                </div> 
515                            </div> 
516                        </#list> 
517                    </div> 
518                </div> 
519            </div> 
520        </div> 
521    </div> 
522</#if> 
523 
524<#if hasTappe?c = "true"> 
525	<#if validator.isNotNull(descrizione_due.getData()) && descrizione_due.getData() != '<p>null</p>'> 
526		<div class="container-fluid bg-white"> 
527			<div class="row"> 
528				<article class="container padding-bottom-em-3"> 
529		            <div class="row"> 
530						<div class="col-12 col-md-8"> 
531						    <div class="text-block text-block-left"> 
532					            <div class="text"> 
533					                ${descrizione_due.getData()} 
534					            </div> 
535						    </div> 
536						</div> 
537					</div> 
538				</article> 
539			</div> 
540		</div> 
541	</#if> 
542</#if> 
543 
544<#if descrizione_immagine?? && descrizione_immagine.getSiblings()?has_content> 
545    <div class="container-fluid bg-white"> 
546        <div class="row"> 
547            <div class="carousel-container carousel-no-ctrl transparent margin-bottom-em-1 tns-overflow-show carousel-image-slide carousel-draggable"> 
548                <div class="tns-carousel tns-carousel-no-ctrl" data-tns-config="{&quot;autoWidth&quot;:true,&quot;items&quot;:2,&quot;autoplay&quot;:false, 
549                    &quot;responsive&quot;:{&quot;768&quot;:{&quot;items&quot;:3},&quot;992&quot;:{&quot;items&quot;:4}}}"> 
550                    <#if descrizione_immagine?? && descrizione_immagine.getSiblings()?has_content>  
551                        <#list descrizione_immagine.getSiblings() as cur_descrizione_immagine>  
552                            <div class="item-with-caption"> 
553                             
554                            	<#assign linkImmagine = ""> 
555                            	<#if cur_descrizione_immagine.immagine.getData()?contains("?")> 
556									<#assign linkImmagine = cur_descrizione_immagine.immagine.getData() + "&width=" + widthSliderImg >  
557								<#else> 
558									<#assign linkImmagine = cur_descrizione_immagine.immagine.getData() + "?width=" + widthSliderImg >  
559								</#if> 
560                             
561                                <img class="slide-image" src="${linkImmagine}" alt="${cur_descrizione_immagine.testo_alternativo.getData()}"> 
562                                <#if cur_descrizione_immagine.didascalia.getData()?? && cur_descrizione_immagine.didascalia.getData()?has_content && cur_descrizione_immagine.didascalia.getData()?trim?length gt 0 && cur_descrizione_immagine.didascalia.getData()?trim != "null"> 
563                                	<p class="caption">${cur_descrizione_immagine.didascalia.getData()}</p> 
564                                </#if> 
565                            </div>  
566                        </#list>  
567                    </#if> 
568                </div> 
569            </div> 
570        </div> 
571    </div> 
572</#if> 
573 
574<#assign lang = "it"/> 
575<#if themeDisplay.getLanguageId()?contains("_")> 
576    <#assign lang = themeDisplay.getLanguageId()?split("_")[0]/>     
577<#else> 
578	<#assign lang = themeDisplay.getLanguageId()/>    
579</#if> 
580<#assign tomApi = serviceLocator.findService("it.inera.tom.api.TOMAPI")> 
581 
582<#if municipalityNames?has_content && municipalityNames?size gt 0 && lang?has_content && lang?trim?length gt 0 && tomApi?has_content> 
583 
584<#assign offerResults = tomApi.getJsonOffersListResultByMunicipalities(municipalityNames, lang) /> 
585<#if offerResults?? && offerResults?has_content> 
586	<#assign offerResponse = offerResults.getResponse()> 
587	<#if offerResponse?? && offerResponse?has_content> 
588		<#assign offerResults = offerResponse.getResults()> 
589		<#if offerResults?? && offerResults?has_content> 
590	        <aside class="container-fluid bg-white" id="hideable"> 
591    		    <div class="row"> 
592		            <div class="container padding-top-em-3"> 
593		                <div class="row"> 
594		                    <div class="col-12 col-md-10 offset-md-1 margin-bottom-lg-em-0 margin-bottom-em-2"> 
595		                        <div class="text-block text-block-center"> 
596		                            <div class="title-2"> 
597										<@liferay.language key="label.migliori.offerte" /> 
598		                            </div> 
599		                            <div class="text"> 
600		                                <@liferay.language key="label.proposte.vivere.umbria" /> 
601	                                </div> 
602	                            </div> 
603		                    </div> 
604		                </div> 
605	 
606		                <div class="row"> 
607		                    <div class="col-12"> 
608		                        <div class="d-flex flex-justify-content-end"> 
609		                            <a class="link-showall" href="/offerte-luogo?municipality=${municipalityNamesString}&territory=${territoryNameString}"><@liferay.language key="label.vedi.tutte" /> 
610		                                <i class="fas fa-angle-right"></i> 
611	                                </a> 
612		                        </div> 
613		                    </div> 
614		                    <div class="col-12"> 
615		                        <div class="row"> 
616		                            <div class="col-12 padding-bottom-em-3"> 
617		                                <div class="carousel-container transparent margin-top-em-1 margin-bottom-em-2"> 
618		                                    <div class="tns-carousel tns-carousel-default"> 
619		                  	                    <#list offerResults as offerResult> 
620			                  	                    <#if offerResult.getGalleries()?has_content && offerResult.getGalleries().getImages()?has_content 
621			                  	                    && offerResult.getGalleries().getImages()?size gt 0 
622			                  	                    && offerResult.getGalleries().getImages()[0].getFile()?has_content> 
623			                  	                    <div> 
624			                                            <div class="card card-1 card-offerta has-info-commercial"> 
625			                                                <a class="card-link" href="/dettaglio-offerta/-/dettaglio/${offerResult.getSlug()}_${offerResult.getId()}_${offerResult.getType()}"></a> 
626                        			                        <div class="card-header"> 
627    			                                                <div class="card-header-bg aspect-ratio aspect-ratio-4-3"> 
628                        			                          		<#if offerResult.getGalleries()?has_content> 
629                        			                          			<#if offerResult.getGalleries().getImages()?has_content && offerResult.getGalleries().getImages()?size gt 0> 
630                        			                          				<#assign file = ""/> 
631                        			                          				<#assign alt = ""/> 
632                        			                          				<#if offerResult.getGalleries().getImages()[0].getFile()?has_content> 
633                        			                          					<#assign file = tomBaseImagePath + offerResult.getGalleries().getImages()[0].getFile()/> 
634                        			                          				<#else> 
635                        			                          					<#assign file = "/o/umbria-theme/images/loghi/logo_no_image.png"/> 
636                        			                          				</#if> 
637                        			                          				<#if offerResult.getGalleries().getImages()[0].getAlt()?has_content> 
638                        			                          					<#assign alt = offerResult.getGalleries().getImages()[0].getAlt()/> 
639                        			                          				</#if> 
640                        			                          				<img src="${file}?params[width]=354" alt="${alt}"> 
641                        			                          			</#if> 
642                        			                          		<#else> 
643                        			                          			<#assign file = "/o/umbria-theme/images/loghi/logo_no_image.png"/> 
644                        			                          			<img src="${file}?params[width]=354" alt="logo_no_image"> 
645                        			                          		</#if> 
646    	                          		                        </div> 
647    	                          		                         
648    	                          		                        <#if offerResult.getType()?? && offerResult.getType()?has_content && offerResult.getType()?trim?length gt 0 && offerResult.getType()?trim != "accommodation"> 
649    	                          		                        	<a class="link link-tripplanner link-tripplanner-top-right margin-top-em-2 margin-right-em-1" href="#" data-detail-type="${offerResult.getType()}/offer" data-id="${offerResult.getId()}" data-tom="true"> 
650    	                          		                        		<i class="far fa-heart text-red"></i><i class="fas fa-heart text-red" style="display:none;"></i></a> 
651    	                          		                        	</a> 
652    	                          		                        <#else> 
653    	                          		                        	<a class="link link-tripplanner link-tripplanner-top-right margin-top-em-2 margin-right-em-1" href="#" data-detail-type="${offerResult.getType()}" data-id="${offerResult.getId()}" data-tom="true"> 
654    	                          		                        		<i class="far fa-heart text-red"></i><i class="fas fa-heart text-red" style="display:none;"></i></a> 
655    	                          		                        	</a> 
656    	                          		                        </#if> 
657    			                                                <div class="card-header-info"> 
658    			                                                    <div class="card-badges"> 
659        								                                <div class="badge badge-light-blue"> 
660        										                            <#if offerResult.getType() == 'guide'> 
661        										  		                        <@liferay.language key="label.guide" /> 
662        										                            </#if> 
663        										                            <#if offerResult.getType() == 'travelagency'> 
664        										  		                        <@liferay.language key="label.pacchetti.turistici" /> 
665        										                            </#if> 
666        										                            <#if offerResult.getType() == 'consortium'> 
667        										  		                        <@liferay.language key="label.pacchetti.turistici" /> 
668        										                            </#if> 
669        										                            <#if offerResult.getType() == 'accommodation'> 
670        										  		                        <@liferay.language key="label.accommodation" /> 
671        										                            </#if> 
672        								                                </div> 
673        								                            </div> 
674    			                                                    <div class="header-title title-5"> 
675    			                                                    </div> 
676    			                                                </div> 
677    			                                            </div> 
678    			                                            <#if offerResult?has_content> 
679    			                                            <div class="card-body"> 
680        		                                                <div class="card-body-title title-4"> 
681        		                                                    ${offerResult.getTitle()} 
682        			                                            </div> 
683        			                                            <#if offerResult.getSubtitle()?has_content> 
684        			                                            <div class="card-body-subtitle"> 
685        			                                                ${offerResult.getSubtitle()} 
686        			                                            </div> 
687        			                                            </#if> 
688        			                                        </div> 
689        			                                        </#if> 
690    			                                            <div class="card-info card-info-readmore"> 
691    			                                                <div class="info hidden"><@liferay.language key="label.continua.a.leggere" /></div> 
692    			                                            </div> 
693    			                                            <div class="card-info"> 
694    			                        	                    <span class="info"> 
695    			                        		                    <!--<a href="#" class="text-light-blue text-bold"> 
696    			                        		                            <i class="fas fa-map-pin"></i> 
697    	                        		                            </a>--> 
698    		                        		                    </span> 
699    			                                            </div> 
700    			                                            <div class="card-info card-info-commercial"> 
701        		                                                <#if offerResult.getDuration()?has_content && offerResult.getDuration().getCount()?has_content && offerResult.getDuration().getType()?has_content> 
702    				                                                <div class="info info-commercial"> 
703    				                                                    <div class="label"><@liferay.language key="label.durata" /></div> 
704    				                                                    <div class="title text-bold"> 
705    				                                                        ${offerResult.getDuration().getCount()} ${offerResult.getDuration().getType()} 
706    			                                                        </div> 
707    				                                                </div> 
708    				                                            <#else> 
709    				                                            	<div class="info info-commercial"> 
710    				                                                    <div class="label">&nbsp;</div> 
711    				                                                    <div class="title text-bold"> 
712    				                                                        &nbsp; 
713    			                                                        </div> 
714    				                                                </div> 
715    			                                                </#if> 
716    			                                                <div class="info info-commercial"> 
717    		                                                        <#if offerResult.getMinimumPrice()?has_content && offerResult.getMinimumPrice()!=0> 
718	    		                                                        <div class="label"> 
719	    			                                                        <@liferay.language key="label.a.partire.da" /> 
720	    		                                                        </div> 
721	    			                                                    <div class="title text-bold"> 
722	    			                                                        <@liferay.language key="label.euro" /> ${offerResult.getMinimumPrice()} 
723	    		                                                        </div> 
724    		                                                        <#else> 
725	    		                                                        <div class="label"> 
726	    			                                                        <@liferay.language key="label.prezzo.su.richiesta" /> 
727	    		                                                        </div> 
728	    			                                                    <div class="title text-bold"> 
729	    			                                                        &nbsp; 
730	    		                                                        </div> 
731    		                                                        </#if> 
732    			                                                </div> 
733    			                                            </div> 
734			                                            </div> 
735			                                        </div> 
736			                                        </#if> 
737		                  	                    </#list> 
738		                                    </div> 
739		                                </div> 
740		                            </div> 
741		                        </div> 
742		                    </div> 
743	                    </div> 
744		            </div> 
745		        </div> 
746		    </aside> 
747  	    </#if> 
748	</#if> 
749</#if> 
750 
751</#if> 
752 
753<#if results?size gt 0 || relatedResults?size gt 0> 
754    <aside class="container-fluid bg-gray"> 
755        <div class="row"> 
756            <div class="container padding-top-em-3 padding-bottom-em-5"> 
757                <div class="row"> 
758                    <div class="col-12 col-md-10 offset-md-1 margin-bottom-em-2 margin-bottom-lg-em-0"> 
759                        <div class="text-block text-block-center"> 
760                            <div class="title-2"> 
761                                <@liferay.language key="label.potrebbe.interessarti.anche"/> 
762                            </div> 
763                            <div class="text"> 
764                                <@liferay.language key="label.scopri.proposte.uniche"/> 
765                            </div> 
766                        </div> 
767                    </div> 
768                    <!--<div class="col-12"> 
769                        <div class="d-flex flex-justify-content-end"> 
770                            <a class="link-showall" href="#"> 
771                                <@liferay.language key="label.scopri.tutte"/> 
772                                <i class="fas fa-angle-right"></i> 
773                            </a> 
774                        </div> 
775                    </div>--> 
776                    <div class="col-12"> 
777                        <div class="row"> 
778                            <div class="col-12 padding-bottom-em-3"> 
779                                <div class="carousel-container transparent margin-top-em-1 margin-bottom-em-2"> 
780                                    <div class="tns-carousel tns-carousel-default"> 
781                                      	 
782                                      	<#-- GESTIONE RALATED ASSETS RENDERIZZAZIONE--> 
783                                      	<#list relatedResults as relatedResult> 
784											<div> 
785                	                            <div class="card card-1 card-offerta"> 
786                    	                      	    <a class="card-link" href="${relatedResult.getHref()}"></a> 
787                	                                <div class="card-header"> 
788                    	                                <div class="card-header-bg aspect-ratio aspect-ratio-4-3"> 
789                    	                          	        <img src="${relatedResult.getImg().getSrc()}" alt="${relatedResult.getImg().getAlt()}"> 
790                	                                    </div> 
791                    	                                <a class="link link-tripplanner link-tripplanner-top-right margin-top-em-2 margin-right-em-1" href="${relatedResult.getHref()}" data-id="${relatedResult.getId()}" data-tom="false"> 
792                    	                          	        <i class="far fa-heart text-red"></i> 
793                    	                          	        <i class="fas fa-heart text-red" style="display:none"></i> 
794                    	                                </a> 
795                    	                                <div class="card-header-info"> 
796                    	                                    <div class="card-badges"> 
797                    	                                    	<#assign categoryNames = relatedResult.getHeader().getInfo() > 
798                        	                          	        <#list categoryNames as categoryName> 
799                        	                            	        <div class="badge badge-red"> 
800                        	                            	            ${categoryName} 
801                    	                            	            </div> 
802                    	                            	            <a class="header-title title-5" href="#"></a> 
803                        								        </#list> 
804                        								    </div> 
805                    	                                </div> 
806                    	                            </div> 
807                    	                            <div class="card-body"> 
808                        	                        	<a class="card-body-title title-4" href="${relatedResult.getHref()}"> 
809                        	                        	    ${relatedResult.getTitle()} 
810                    	                        	    </a> 
811                    	                        	    <div class="card-body-subtitle"> 
812                    	                        	    	<#if relatedResult.getSubtitle()?? && relatedResult.getSubtitle()?has_content && relatedResult.getSubtitle()?trim?length gt 0 && relatedResult.getSubtitle()?trim != "null"> 
813                    	                          	        	${relatedResult.getSubtitle()} 
814                    	                          	        </#if> 
815                	                          	        </div> 
816                	                          	         
817                	                                </div> 
818                    	                            <div class="card-info"> 
819                    	                        	    <span class="info"></span> 
820                    	                            </div> 
821                	                            </div> 
822                	                        </div> 
823										</#list> 
824										<#-- GESTIONE RALATED ASSETS FINE RENDERIZZAZIONE--> 
825                                      	 
826                                      	<#list results as related> 
827                    						<#assign langId = themeDisplay.getLanguageId() /> 
828                    						<#assign contentByLocale = related.getContentByLocale(themeDisplay.getLanguageId()) /> 
829                    						<#assign document = saxReaderUtil.read(contentByLocale) > 
830                    						<#assign rootElement = document.getRootElement()> 
831                    					 
832                    						<#assign xPathTitolo = saxReaderUtil.createXPath("dynamic-element[@name='titolo']")> 
833                    						<#assign relatedTitolo = xPathTitolo.selectSingleNode(rootElement).getStringValue()> 
834                    						 
835                    						<#assign xPathSottotitolo = saxReaderUtil.createXPath("dynamic-element[@name='sottotitolo']")> 
836                    						<#assign relatedSottotitolo = xPathSottotitolo.selectSingleNode(rootElement).getStringValue()> 
837                    						 
838                    						<#assign xPathImmagineBanner = saxReaderUtil.createXPath("dynamic-element[@name='immagine_banner']")> 
839                    						<#assign relatedImmagineBanner = xPathImmagineBanner.selectSingleNode(rootElement).getStringValue()> 
840                    						 
841                    						<#assign xPathTestoAlternativoImmagineBanner = saxReaderUtil.createXPath("dynamic-element[@name='testo_alternativo_immagine_banner']")> 
842                    						<#assign relatedTestoAlternativoImmagineBanner = xPathTestoAlternativoImmagineBanner.selectSingleNode(rootElement).getStringValue()> 
843                    						 
844                    						<#if relatedImmagineBanner?has_content && relatedImmagineBanner?trim?length gt 0 > 
845                    						 
846                    						<#attempt> 
847                                                <#assign immagineBannerJson = relatedImmagineBanner?eval > 
848                    							<#assign url = "/documents/${immagineBannerJson.groupId}/${immagineBannerJson.classPK}/${immagineBannerJson.title}/${immagineBannerJson.uuid}?width=${widthCardImg}"> 
849                                            			<#recover> 
850                                              				<#assign url = "" > 
851                                            			</#attempt> 
852 
853                    						<#else> 
854                    							<#assign url = "" > 
855                    						</#if> 
856                    						 
857                    						<#assign resourcePrimKey = related.getResourcePrimKey() /> 
858                    						<#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", resourcePrimKey) /> 
859                    						<#assign assetEntryId = assetEntry.getEntryId() /> 
860                    						 
861                    						<#assign categories = assetCategoryLocalService.getAssetEntryAssetCategories(assetEntryId) > 
862                    						 
863                    						<#assign categoryNames = [] > 
864                    						 
865                    						<#list categories as category> 
866                    							<#if vocabularyIdUmbria == category.getVocabularyId() > 
867                    								<#assign categoryNames = categoryNames + [category.getTitle(themeDisplay.getLanguageId())] > 
868                    							</#if> 
869                    						</#list> 
870                    						 
871                    	                    <div> 
872                	                            <div class="card card-1 card-offerta"> 
873                    	                      	    <a class="card-link" href="/-/${related.getUrlTitle()}"></a> 
874                	                                <div class="card-header"> 
875                    	                                <div class="card-header-bg aspect-ratio aspect-ratio-4-3"> 
876                    	                          	        <img src="${url}" alt="${relatedTestoAlternativoImmagineBanner}"> 
877                	                                    </div> 
878                    	                                <a class="link link-tripplanner link-tripplanner-top-right margin-top-em-2 margin-right-em-1" href="/-/${related.getUrlTitle()}" data-id="${related.getArticleId()}" data-tom="false"> 
879                    	                          	        <i class="far fa-heart text-red"></i> 
880                    	                          	        <i class="fas fa-heart text-red" style="display:none"></i> 
881                    	                                </a> 
882                    	                                <div class="card-header-info"> 
883                    	                                    <div class="card-badges"> 
884                        	                          	        <#list categoryNames as categoryName> 
885                        	                            	        <div class="badge badge-red"> 
886                        	                            	            ${categoryName} 
887                    	                            	            </div> 
888                    	                            	            <a class="header-title title-5" href="#"></a> 
889                        								        </#list> 
890                        								    </div> 
891                    	                                </div> 
892                    	                            </div> 
893                    	                            <div class="card-body"> 
894                        	                        	<a class="card-body-title title-4" href="/-/${related.getUrlTitle()}"> 
895                        	                        	    ${relatedTitolo} 
896                    	                        	    </a> 
897                    	                          	    <div class="card-body-subtitle"> 
898                    	                          	         ${relatedSottotitolo} 
899                	                          	        </div> 
900                	                                </div> 
901                    	                            <div class="card-info"> 
902                    	                        	    <span class="info"></span> 
903                    	                            </div> 
904                	                            </div> 
905                	                        </div> 
906                	                        <#assign categoryNames = [] > 
907                	                        <#assign categories = [] > 
908                	                    </#list> 
909                                    </div> 
910                                </div> 
911                            </div> 
912                        </div> 
913                    </div> 
914                </div> 
915            </div> 
916        </div> 
917    </aside> 
918</#if> 
919 
920<script> 
921$("#backLink").click(function(event) { 
922    event.preventDefault(); 
923    history.back(1); 
924}); 
925</script> 
926<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5c5d3c404544fcaf"></script>