The following has evaluated to null or missing:
==> listDates [in template "1315478#1315513#2234713" at line 311, column 55]
----
Tip: If the failing expression is known to 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: #if (listDates.DateRange.dataInizio??... [in template "1315478#1315513#2234713" at line 311, column 49]
----
1<#include "_TEMPLATE_CONTEXT_/1315478/1331017/23609/1656602">
2
3<#assign
4 articleId = .vars['reserved-article-id'].data
5 territorioCategories = getContentVocabularyCategories(articleId, "TERRITORIO", groupId)
6 sliderCategories = []
7 slides = 0
8 showMap = true
9 hasSlides = false
10 hasGallery = false
11 hasAllegati = false
12 lat = 0
13 lng = 0
14
15 groupedCategories = getNavCircCategories(articleId, groupId)
16/>
17
18<#-- MASONRY -->
19<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.js"></script>
20
21<#if hideMap?? && hideMap.getData() == "true">
22 <#assign showMap = false>
23</#if>
24
25<#list territorioCategories as tCat>
26 <#if tCat.parentCategoryId != 0>
27 <#assign sliderCategories += [tCat.name]>
28 </#if>
29</#list>
30
31<#if tourismItem.geoRef?? && tourismItem.geoRef.getData()?has_content>
32 <#assign
33 geolocationJSONObject = jsonFactoryUtil.createJSONObject(tourismItem.geoRef.getData())
34 lat = geolocationJSONObject.getDouble("latitude")
35 lng = geolocationJSONObject.getDouble("longitude")
36 />
37</#if>
38
39<#if tourismItem.coordinateTestuali.getData()?has_content>
40 <#assign
41 lat = tourismItem.coordinateTestuali.getData()?keep_before(",")?number
42 lng = tourismItem.coordinateTestuali.getData()?keep_after(",")?number
43 />
44</#if>
45
46
47
48<#list tourismItem.contactFields.singleContact.allegatiFieldSet.getSiblings() as a>
49 <#if a.allegatiFieldSetFieldSet.getData()?has_content>
50 <#assign hasAllegati = true>
51 <#break>
52 </#if>
53</#list>
54
55<#if tourismItem.slideHeader?? && tourismItem.slideHeader.getSiblings()?has_content>
56 <#list tourismItem.slideHeader.getSiblings() as slide>
57 <#if slide.getData()?has_content>
58 <#assign
59 hasSlides = true
60 slides = tourismItem.slideHeader.getSiblings()?size
61 />
62 <#break>
63 </#if>
64 </#list>
65</#if>
66
67<#if tourismItem.ImmagineGallery?? && tourismItem.ImmagineGallery.getSiblings()?has_content>
68 <#list tourismItem.ImmagineGallery.getSiblings() as item>
69 <#if item.getData()?has_content>
70 <#assign hasGallery = true>
71 <#break>
72 </#if>
73 </#list>
74</#if>
75
76<!-- Modello evento -->
77
78<#if hasSlides>
79 <#assign marginTop = "">
80<#else>
81 <#assign marginTop = "tw:mt-70">
82</#if>
83
84<div id="${portletNamespace}" class="${marginTop}" v-cloak>
85
86 <#-- BREADCRUMBS -->
87 <#if themeDisplay.getLayout().getAncestors()?has_content>
88 <section id="breadcrumb" class="mt-4">
89 <div class="container-fluid custom-container d-flex align-items-center">
90 <ol class="breadcrumb tw-space-x-2">
91 <li class="breadcrumb-item">
92 <a href="/" class="breadcrumb-link" title="Home">
93 <span class="breadcrumb-text-truncate tw:text-dark tw:uppercase">Home</span>
94 </a>
95 </li>
96
97 <#list themeDisplay.getLayout().getAncestors()?reverse as ancestor>
98 <li class="breadcrumb-item">
99 <a href="${ancestor.getFriendlyURL()}" class="breadcrumb-link" title="${escape(ancestor.getHTMLTitle(themeDisplay.getLocale()))}">
100 <span class="breadcrumb-text-truncate tw:text-dark tw:uppercase">${escape(ancestor.getHTMLTitle(themeDisplay.getLocale()))}</span>
101 </a>
102 </li>
103 </#list>
104
105 <li class="breadcrumb-item active">
106 <span class="tw:text-green tw:uppercase" title="${tourismItem.title.getData()?js_string}">
107 ${tourismItem.title.getData()}
108 </span>
109 </li>
110 </ol>
111 </div>
112 </section>
113 </#if>
114
115 <div class="ev-intro">
116 <div class="container-fluid custom-container d-flex align-items-center">
117 <div class="mt-2">
118 <#if tourismItem.title?? && tourismItem.title.getData()?has_content>
119 <h1>${tourismItem.title.getData()}</h1>
120 </#if>
121
122 <#if tourismItem.subTitle?? && tourismItem.subTitle.getData()?has_content>
123 <h3>${tourismItem.subTitle.getData()}</h3>
124 </#if>
125 </div>
126 <div class="lg:tw:hidden">
127 <button type="button" @click="isFavorite(item.id) ? removeFavorite(item) : setFavorite(item);" class="btn btn-link tw:no-underline" :title="isFavorite(item.id) ? `${getLabel('rimuovi_preferiti', groupId)}` : `${getLabel('aggiungi_preferiti', groupId)}`">
128 <i :class="(isFavorite(item.id) ? 'fas' : 'fal') + ' fa-heart fa-lg tw:text-green'"></i>
129 </button>
130 <button type="button" @click="share(item.contentJSON.title, item.contentJSON.description)" class="btn btn-link tw:no-underline">
131 <i class="fas fa-share-alt fa-lg tw:text-green"></i>
132 </button>
133 </div>
134 <div class="d-flex align-items-center ml-auto">
135 <button type="button" @click="isFavorite(item.id) ? removeFavorite(item) : setFavorite(item);" class="btn btn-link tw:no-underline" :title="isFavorite(item.id) ? `${getLabel('rimuovi_preferiti', groupId)}` : `${getLabel('aggiungi_preferiti', groupId)}`">
136 <i :class="(isFavorite(item.id) ? 'fas' : 'fal') + ' fa-heart fa-2x tw:text-green'"></i>
137 </button>
138
139 <div class="btn dropdown tw:px-0">
140 <button type="button" class="btn btn-link dropdown-toggle tw:no-underline tw:text-green" data-toggle="dropdown">
141 <i class="fas fa-share-alt fa-2x"></i>
142 </button>
143 <div class="dropdown-menu dropdown-menu-center">
144 <button type="button" @click="customShare('facebook', item.contentJSON.title, item.contentJSON.description, item.contentJSON.previewPicture)" class="dropdown-item tw:space-x-2">
145 <i class="fab fa-facebook-f fa-lg tw:text-green"></i>
146 <span class="tw:text-dark">
147 Facebook
148 </span>
149 </button>
150
151 <button type="button" @click="customShare('twitter', item.contentJSON.title, item.contentJSON.description, item.contentJSON.previewPicture)" class="dropdown-item tw:space-x-2">
152 <i class="fab fa-twitter fa-lg tw:text-green"></i>
153 <span class="tw:text-dark">
154 Twitter
155 </span>
156 </button>
157
158 <button type="button" @click="customShare('pinterest', item.contentJSON.title, item.contentJSON.description, item.contentJSON.previewPicture)" class="dropdown-item tw:space-x-2">
159 <i class="fab fa-pinterest fa-lg tw:text-green"></i>
160 <span class="tw:text-dark">
161 Pinterest
162 </span>
163 </button>
164
165 <button type="button" @click="customShare('whatsapp', item.contentJSON.title, item.contentJSON.description, item.contentJSON.previewPicture)" class="dropdown-item tw:space-x-2">
166 <i class="fab fa-whatsapp fa-lg tw:text-green"></i>
167 <span class="tw:text-dark">
168 WhatsApp
169 </span>
170 </button>
171
172 <button type="button" @click="customShare('telegram', item.contentJSON.title, item.contentJSON.description, item.contentJSON.previewPicture)" class="dropdown-item tw:space-x-2">
173 <i class="fab fa-telegram fa-lg tw:text-green"></i>
174 <span class="tw:text-dark">
175 Telegram
176 </span>
177 </button>
178
179 <button type="button" @click="customShare('print', item.contentJSON.title, item.contentJSON.description, item.contentJSON.previewPicture)" class="dropdown-item tw:space-x-2">
180 <i class="fas fa-print fa-lg tw:text-green"></i>
181 <span class="tw:text-dark">
182 Print
183 </span>
184 </button>
185
186 <a :href="'mailto:inserisci indirizzo email?subject=' + item.contentJSON.title + '&body=${currentUrl} ' + item.contentJSON.description" class="dropdown-item tw:space-x-2">
187 <i class="fas fa-envelope fa-lg tw:text-green"></i>
188 <span class="tw:text-dark">
189 Email
190 </span>
191 </a>
192
193 <button type="button" @click="customShare('link', item.contentJSON.title, item.contentJSON.description, item.contentJSON.previewPicture)" class="dropdown-item tw:space-x-2">
194 <i class="fas fa-link fa-lg tw:text-green"></i>
195 <span class="tw:text-dark">
196 Link
197 </span>
198 </button>
199 </div>
200 </div>
201 </div>
202 </div>
203 </div>
204
205 <div class="container-fluid custom-container row mt-4">
206 <#-- PRIMA COL -->
207 <div class="col-12 col-lg-8">
208
209 <#-- IMMAGINE -->
210 <#if hasSlides>
211 <section id="slideshow" class="mb-4">
212 <div class="swiper-container">
213 <div class="swiper-wrapper">
214 <#list tourismItem.slideHeader.getSiblings() as slide>
215 <div class="swiper-slide">
216 <img data-src="${getKitPrefix(slide.getData(), 'tr:w-1920,h-1150,fo-center')}" loading="lazy" class="lazyload" alt="${slide.getAttribute('alt')}"/>
217 <div class="card-img-overlay tw:bg-dark tw:bg-opacity-40"></div>
218
219 <div class="carousel-caption tw:flex tw:text-left tw:transform lg:tw:top-2/4 lg:tw:-translate-y-2/4">
220 <#if tourismItem.testoHeader?? && tourismItem.testoHeader.getData()?has_content>
221 <#assign locationClass = "tw:my-auto">
222 <#else>
223 <#assign locationClass = "tw:mt-auto tw:mb-20">
224 </#if>
225
226 <div class="tw:flex tw:flex-col ${locationClass}">
227 <div class="hcm-bg-capable tw:text-white tw:font-heading tw:uppercase tw:text-2xl tw:mr-auto tw:p-4 tw:rounded-md lg:tw:text-4xl">
228 <#if tourismItem.testoHeader?? && tourismItem.testoHeader.getData()?has_content>
229 <p>${tourismItem.testoHeader.getData()}</p>
230 <div class="dropdown-divider tw:border-green tw:border-t-3 tw:w-3/5 tw:mt-5 tw:mr-auto lg:tw:w-1/5 lg:tw:mt-10"></div>
231 </#if>
232 </div>
233 <#if sliderCategories?has_content>
234 <#assign cleanedCategories = cleanCategories(sliderCategories)>
235
236 <div class="tw:flex tw:mt-7">
237 <i class="fas fa-map-marker-alt fa-2x tw:text-white"></i>
238 <p class="tw:text-white tw:uppercase tw:font-heading tw:font-medium tw:my-auto tw:ml-3">
239 ${cleanedCategories?join(", ")}
240 </p>
241 </div>
242 </#if>
243 </div>
244 </div>
245 </div>
246 </#list>
247 </div>
248 </div>
249 </section>
250 </#if>
251
252 <#-- DESCRIZIONE BREVE -->
253 <#if tourismItem.introDescription?? && tourismItem.introDescription.getData()?has_content>
254 <div class="mb-4">${tourismItem.introDescription.getData()}</div>
255 </#if>
256
257 <#-- DESCRIZIONE FULL -->
258 <#if tourismItem.descriptionFieldSet.description?? && tourismItem.descriptionFieldSet.description.getData()?has_content>
259 <div class="mb-4">${tourismItem.descriptionFieldSet.description.getData()}</div>
260 </#if>
261
262 <#-- ALLEGATI -->
263 <#if hasAllegati>
264 <div class="container tw:mt-20">
265 <div class="sheet tw-bg-light tw:space-y-4 p-3">
266 <#list tourismItem.contactFields.singleContact.allegatiFieldSet.getSiblings() as item>
267 <div class="card tw:bg-transparent tw:border-0 tw:shadow-none tw:my-5">
268 <div class="card-row">
269 <div class="autofit-col">
270 <div class="autofit-section">
271 <i class="fas fa-download fa-lg tw:text-dark"></i>
272 </div>
273 </div>
274 <div class="autofit-col autofit-col-expand autofit-col-gutters">
275 <div class="autofit-section">
276 <a href="${item.allegatiFieldSet.getData()}" class="tw:text-dark tw:underline" download>
277 ${item.allegatiFieldSet.etichettaAllegato.getData()}
278 </a>
279 </div>
280 </div>
281 </div>
282 </div>
283 </#list>
284 </div>
285 </div>
286 </#if>
287 </div>
288
289 <#-- SECONDA COL (EV INFO) -->
290 <div class="col-12 col-lg-3 offset-lg-1 p-lg-0">
291 <div class="ev-info">
292
293 <#-- MAPPA -->
294 <#if showMap>
295 <div id="suggesto-map" class="monochrome-map" style="height: 330px;"></div>
296 </#if>
297
298
299 <#-- DOVE -->
300 <#if indirizzoEvento?? && indirizzoEvento.getData()?has_content>
301 <div class="ev-short-info d-flex">
302 <i class="far fa-map-marker-alt"></i>
303 <div class="d-flex flex-column">
304 <strong>${getLabel("dove")}</strong>
305 <span>${indirizzoEvento.getData()}</span>
306 </div>
307 </div>
308 </#if>
309
310 <#-- PERIODO -->
311 <#if (listDates.DateRange.dataInizio?? && listDates.DateRange.dataInizio.getData()?has_content) || (listDates.DateRange.dataFine?? && listDates.DateRange.dataFine.getData()?has_content)>
312 <div class="ev-short-info d-flex">
313 <i class="fal fa-calendar-alt"></i>
314 <div class="d-flex flex-column">
315 <strong>${getLabel("periodo")}</strong>
316
317 <#assign separatore = "">
318 <#assign startDate = "">
319
320 <#if listDates.DateRange.dataInizio?? && listDates.DateRange.dataInizio.getData()?has_content>
321 <#assign startDate = listDates.DateRange.dataInizio.getData()>
322 <#assign separatore = " - ">
323 ${getContentDate(startDate, "dd MMMM yyyy")}
324 </#if>
325
326 <#if listDates.DateRange.dataFine?? && listDates.DateRange.dataFine.getData()?has_content>
327 <#assign endDate = listDates.DateRange.dataFine.getData()>
328 <#if startDate != endDate>
329 ${separatore}${getContentDate(endDate, "dd MMMM yyyy")}
330 </#if>
331 </#if>
332 </div>
333 </div>
334 </#if>
335
336 <#-- CONTATTI -->
337 <section id="${portletNamespace}" class="mt-3">
338
339 <#if (tourismItem.contactFields.singleContact.getData())??>
340 <#assign contacts = tourismItem.contactFields.singleContact />
341 </#if>
342
343 <#if contacts??>
344 <div class="ev-short-info d-flex">
345 <i class="fal fa-clipboard-user"></i>
346
347 <div class="d-flex flex-column">
348 <strong>${getLabel("contatti")}:</strong>
349 <#if contacts.contactName?? && contacts.contactName.getData()?has_content>
350 <span>${contacts.contactName.getData()}</span>
351 </#if>
352
353 <@indirizzo/>
354
355 <#if contacts.tel?? && contacts.tel.getSiblings()?has_content>
356 <#list contacts.tel.getSiblings() as phone>
357 <#if phone.getData()?has_content>
358 <span><a href="tel:${phone.getData()}">${phone.getData()}</a></span>
359 </#if>
360 </#list>
361 </#if>
362
363 <#if contacts.email?? && contacts.email.getData()?has_content>
364 <span><a href="mailto:${contacts.email.getData()}" target="_blank">${contacts.email.getData()}</a></span>
365 </#if>
366 <#if contacts.email2?? && contacts.email2.getData()?has_content>
367 <span><a href="mailto:${contacts.email2.getData()}" target="_blank">${contacts.email2.getData()}</a></span>
368 </#if>
369
370 <#if contacts.webSite?? && contacts.webSite.getData()?has_content>
371 <span><a href="${contacts.webSite.getData()}" target="_blank">${getLabel('sito-web')}</a></span>
372 </#if>
373
374 <div class="d-flex">
375 <#if contacts.facebook?? && contacts.facebook.getData()?has_content>
376 <a href="${contacts.facebook.getData()}" class="btn btn-social mr-3 mt-3" target="_blank">
377 <i class="fab fa-facebook-f fa-lg"></i>
378 </a>
379 </#if>
380
381 <#if contacts.instagram?? && contacts.instagram.getData()?has_content>
382 <a href="${contacts.instagram.getData()}" class="btn btn-social mr-3 mt-3" target="_blank">
383 <i class="fab fa-instagram fa-lg"></i>
384 </a>
385 </#if>
386 </div>
387
388 <#if contacts.altreInfo?? && contacts.altreInfo.getData()?has_content>
389 <div class="mt-4 d-flex flex-column">
390 <strong>${getLabel("informazioni_utili")}:</strong>
391 <span>${contacts.altreInfo.getData()}</span>
392 </div>
393 </#if>
394 </div>
395 </div>
396 </#if>
397
398 </section>
399
400 <#-- RICHIEDI INFO -->
401 <a href="#contact-form" class="smooth-scroll underline-btn underline-green">
402 ${getLabel("richiedi_info")}:
403 </a>
404
405 </div>
406 </div>
407 </div>
408
409 <#-- MASONRY GALLERY -->
410 <#if hasGallery>
411 <section id="gallery" class="mt-4">
412 <div class="container-fluid custom-container">
413 <div class="gallery-grid grid">
414 <#list tourismItem.ImmagineGallery.getSiblings() as pic>
415 <div class="grid-item">
416 <a href="javascript:void(0);" data-toggle="modal" data-target="#lightbox-modal" data-slider="${pic?index}">
417 <img src="${getKitPrefix(pic.getData(), 'tr:w-900,fo-center')}" alt="${pic.getAttribute('alt')!''}" />
418 </a>
419 </div>
420 </#list>
421 </div>
422 </div>
423
424 <div id="lightbox-modal" tabindex="-1" role="dialog" class="modal fade">
425 <div class="modal-dialog modal-full-screen tw:inset-0 tw:border-none tw:shadow-none">
426 <div class="modal-content tw:bg-transparent">
427 <div class="modal-body tw:overflow-hidden">
428 <div class="tw:absolute tw:top-0 tw:right-0 tw:z-5">
429 <button type="button" data-dismiss="modal" class="btn btn-monospaced btn-secondary m-3">
430 <i class="fal fa-times fa-lg"></i>
431 </button>
432 </div>
433
434 <#-- lightbox -->
435 <div id="lightbox-swiper" class="swiper-container h-75 my-auto">
436 <div class="swiper-button-prev tw:w-12 tw:h-12">
437 <span class="sticker sticker-circle hcm-bg-capable tw:bg-green tw:w-full tw:h-full">
438 <span class="sticker-overlay">
439 <i class="fas fa-chevron-left fa-2x tw:text-white"></i>
440 </span>
441 </span>
442 </div>
443
444 <div class="swiper-button-next tw:w-12 tw:h-12">
445 <span class="sticker sticker-circle hcm-bg-capable tw:bg-green tw:w-full tw:h-full">
446 <span class="sticker-overlay">
447 <i class="fas fa-chevron-right fa-2x tw:text-white"></i>
448 </span>
449 </span>
450 </div>
451
452 <div class="swiper-wrapper tw:h-full">
453 <#list tourismItem.ImmagineGallery.getSiblings() as pic>
454 <div class="swiper-slide tw:h-full">
455 <img data-src="${getKitPrefix(pic.getData(), 'tr:w-1920,fo-center')}" loading="lazy" class="lazyload tw:h-full tw:object-contain tw:mx-auto" alt="${pic.getAttribute('alt')!''}">
456 </div>
457 </#list>
458 </div>
459 </div>
460
461 <#-- thumbnails -->
462 <div id="thumbnail-swiper" class="swiper-container" thumbsSlider="">
463 <div class="swiper-wrapper">
464 <#list tourismItem.ImmagineGallery.getSiblings() as pic>
465 <div class="swiper-slide">
466 <img data-src="${getKitPrefix(pic.getData(), 'tr:w-300,fo-center')}" loading="lazy" class="lazyload tw:object-cover tw:cursor-pointer tw:h-full tw:w-full" alt="${pic.getAttribute('alt')!''}">
467 </div>
468 </#list>
469 </div>
470 </div>
471 </div>
472 </div>
473 </div>
474 </div>
475 </section>
476 </#if>
477
478 <#assign hasDownloads = false>
479 <#if downloads?? && downloads.getSiblings()?has_content>
480 <#list downloads.getSiblings() as item>
481 <#if item.downloadUrl.getData()?has_content>
482 <#assign hasDownloads = true>
483
484 <#break>
485 </#if>
486 </#list>
487 </#if>
488
489
490 <#if hasDownloads >
491 <section id="downloads" >
492 <div class="container tw:mt-20">
493 <div class="sheet tw-bg-light tw:space-y-4 p-3">
494 <#list downloads.getSiblings() as item>
495 <#-- #assign doc = getFileFromUuid(createObject(item.downloadUrl.data).uuid, groupId) -->
496
497 <div class="card tw:bg-transparent tw:border-0 tw:shadow-none">
498 <div class="card-row">
499 <div class="autofit-col">
500 <div class="autofit-section">
501 <i class="fal fa-file-pdf fa-lg tw:text-dark"></i>
502 </div>
503 </div>
504 <div class="autofit-col autofit-col-expand autofit-col-gutters">
505 <div class="autofit-section">
506 <a href="${item.downloadUrl.getData()}" class="tw:text-dark tw:font-bold" download>
507 <#-- ${doc.fileName} -->
508 ${item.downloadText.getData()}
509
510 <span class="tw:font-light muted tw:ml-2">(scarica qui)</span>
511 </a>
512 </div>
513 </div>
514 </div>
515 </div>
516 </#list>
517 </div>
518 </div>
519 </section>
520 </#if>
521
522</div>
523
524<#macro indirizzo>
525 <#assign
526 street_number1Sz=""
527 localitaSz=""
528 comuneSz=""
529 countrySz=""
530 zipCodeSz=""
531 thereAreAddress="false"
532 />
533
534 <#if contacts.street_number1?? && contacts.street_number1.getData()?has_content>
535 <#assign street_number1Sz=contacts.street_number1.getData()>
536 <#assign thereAreAddress="true">
537 </#if>
538 <#if contacts.localita?? && contacts.localita.getData()?has_content>
539 <#assign localitaSz=contacts.localita.getData()>
540 <#assign thereAreAddress="true">
541 </#if>
542 <#if contacts.comune?? && contacts.comune.getData()?has_content>
543 <#assign comuneSz=contacts.comune.getData()>
544 <#assign thereAreAddress="true">
545 </#if>
546 <#if contacts.country?? && contacts.country.getData()?has_content>
547 <#assign countrySz=contacts.country.getData()>
548 <#assign thereAreAddress="true">
549 </#if>
550 <#if contacts.zipCode?? && contacts.zipCode.getData()?has_content>
551 <#assign zipCodeSz=contacts.zipCode.getData()>
552 <#assign thereAreAddress="true">
553 </#if>
554
555 <#assign acapo="false">
556 <#if thereAreAddress == "true">
557 <p class="tw:text-dark tw:font-light tw:text-lg tw:mt-5">
558 <#if street_number1Sz != "">
559 <#if acapo == "true"><br/></#if>
560 ${street_number1Sz}
561 <#assign acapo="true">
562 </#if>
563 <#if localitaSz != "">
564 <#if acapo == "true"><br/></#if>
565 ${localitaSz}
566 <#assign acapo="true">
567 </#if>
568
569 <#if zipCodeSz != "" || comuneSz != "" || countrySz != "">
570 <#if acapo == "true"><br/></#if>
571 ${zipCodeSz} ${comuneSz} ${countrySz}
572 <#assign acapo="true">
573 </#if>
574 </p>
575 </#if>
576
577
578</#macro>
579
580<script src="https://s3-eu-west-1.amazonaws.com/mkspresstage.suggesto.eu/components/securityV2.js"></script>
581
582<script src="https://s3-eu-west-1.amazonaws.com/mkspresstage.suggesto.eu/components/initVueApp.js"></script>
583<script src="https://s3-eu-west-1.amazonaws.com/mkspresstage.suggesto.eu/mixins/js/favorites.js"></script>
584<script src="https://s3-eu-west-1.amazonaws.com/mkspresstage.suggesto.eu/mixins/js/share.js"></script>
585
586<script>
587 var ${portletNamespace}_custom_hook = {
588 data: {
589 debugMode: true,
590 item: {
591 id: "${articleId}",
592 contentJSON: {
593 title: "${tourismItem.title.getData()?js_string}",
594 description: "${tourismItem.introDescription.getData()?js_string}",
595 geoRef: '${tourismItem.geoRef.getData()}',
596 previewPicture: "${tourismItem.previewPicture.getData()}",
597 viewUrl: window.location.href
598 }
599 },
600 regionLat: "44.3921388",
601 regionLng: "7.5211695",
602 map: null,
603 slider: null,
604 gallery: null,
605 thumbnails: null,
606 lightbox: null,
607 docs: [],
608 },
609 mounted(){
610 var that = this;
611
612 if(${showMap?c}){
613 this.buildMap();
614 }
615
616 if(${hasSlides?c}){
617 this.initSlider();
618 }
619
620 if(${hasGallery?c}){
621 this.initGallery();
622
623 $("#lightbox-modal").on("shown.bs.modal", function(e){
624 that.lightbox.update();
625 that.thumbnails.update();
626 that.lightbox.slideTo($(e.relatedTarget).data("slider"));
627 that.lightbox.update();
628 });
629
630 $("#lightbox-modal .swiper-wrapper").on("click", function(e){
631 if($(e.target).attr("class").includes("swiper-slide")){
632 $("#lightbox-modal").modal("hide");
633 }
634 });
635 }
636 },
637 methods: {
638 buildMap: function(){
639 var layers = [],
640 markers = [],
641 map = new SuggestoMap("suggesto-map");
642
643 var marker = {
644 group: "1",
645 latlng: [parseFloat(${lat}), parseFloat(${lng})],
646 value: "",
647 type: "svgNumIcon",
648 size: "10",
649 color: "#7eba27",
650 html: ""
651 };
652
653 markers.push(marker);
654
655 var mapData = {
656 tilelayer: "osm",
657 gestureHandling: true,
658 fitBounds: false,
659 mapcenter: [parseFloat(${lat}), parseFloat(${lng})],
660 zoom: 14,
661 markersFilter: "*",
662 markers: markers,
663 layers: layers
664 };
665
666 console.log("mapData is: ", mapData);
667
668 map.sm.createMap(mapData);
669
670 this.map = map;
671 },
672 initSlider: function(){
673 this.slider = new Swiper("#slideshow .swiper-container", {
674 loop: ${(slides > 0)?c},
675 effect: "fade",
676 speed: 3000,
677 allowTouchMove: false,
678 autoplay: {
679 delay: 3000,
680 disableOnInteraction: false,
681 },
682 fadeEffect: {
683 crossFade: true,
684 },
685 });
686 },
687 initGallery: function(){
688 this.gallery = new Swiper("#gallery .swiper-container", {
689 slidesPerView: 1,
690 spaceBetween: 25,
691 centerSlides: true,
692 centerInsufficientSlides: true,
693 navigation: {
694 prevEl: ".btn-prev",
695 nextEl: ".btn-next",
696 },
697 breakpoints: {
698 768: {
699 slidesPerView: 2,
700 spaceBetween: 25,
701 },
702 992: {
703 slidesPerView: 3,
704 spaceBetween: 25,
705 },
706 },
707 });
708
709 this.thumbnails = new Swiper("#thumbnail-swiper", {
710 spaceBetween: 10,
711 slidesPerView: 2,
712 centerInsufficientSlides: true,
713 freeMode: true,
714 watchSlidesVisibility: true,
715 watchSlidesProgress: true,
716 breakpoints: {
717 768: {
718 slidesPerView: 3
719 },
720 992: {
721 slidesPerView: 4
722 },
723 1200: {
724 slidesPerView: 5
725 }
726 },
727 });
728
729 this.lightbox = new Swiper("#lightbox-swiper", {
730 spaceBetween: 10,
731 autoHeight: true,
732 observer: true,
733 observeSlideChildren: true,
734 keyboard: {
735 enabled: true
736 },
737 navigation: {
738 nextEl: ".swiper-button-next",
739 prevEl: ".swiper-button-prev"
740 },
741 thumbs: {
742 swiper: this.thumbnails
743 }
744 });
745 },
746 customShare: function(type, title, description, image = ""){
747 if(type == "facebook"){
748 var winHeight = 450,
749 winWidth = 600,
750 winTop = window.screen.height / 2 - winHeight / 2,
751 winLeft = window.screen.width / 2 - winWidth / 2,
752 params = "scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=" + winWidth + ",height=" + winHeight + ",left=" + winLeft + ",top=" + winTop,
753 link = "http://www.facebook.com/sharer.php?s=100&p[title]=" + encodeURIComponent(title) + "&p[summary]=" + encodeURIComponent(description) + "&p[url]=" + window.location.href + "&p[images][0]=" + image;
754
755 window.open(link, "Facebook", params);
756 }
757
758 if(type == "twitter"){
759 var link = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(title) + "&url=" + encodeURIComponent(window.location.href);
760
761 window.open(link, "_blank").focus();
762 }
763
764 if(type == "pinterest"){
765 var link = "https://pinterest.com/pin/create/button/?url=" + encodeURIComponent(window.location.href) + "&description=" + encodeURIComponent(title);
766
767 window.open(link, "_blank").focus();
768 }
769
770 if(type == "whatsapp"){
771 var link = "https://wa.me?text=" + encodeURIComponent(title + ": " + window.location.href);
772
773 window.open(link, "_blank").focus();
774 }
775
776 if(type == "telegram"){
777 var link = "https://t.me/share/url?url=" + window.location.href + "&text=" + encodeURIComponent(title);
778
779 window.open(link, "_blank").focus();
780 }
781
782 if(type == "print"){
783 window.print();
784 }
785
786 if(type == "link"){
787 this.legacyShare();
788 }
789 }
790 }
791 }
792
793 document.addEventListener("DOMContentLoaded", function(){
794 var app = initVueApp(
795 "#${portletNamespace}",
796 "${portletNamespace}",
797 [d40_favorites, d40_share, ${portletNamespace}_custom_hook]
798 );
799 });
800
801 var groupedCategories = '${groupedCategories?js_string}';
802 var contentCoords = [${lat}, ${lng}];
803 console.log("espongo " + groupedCategories);
804
805
806 <#if tourismItem.contactFields.singleContact.email?? && tourismItem.contactFields.singleContact.email.getData()?has_content>
807 var eventEmail = "${tourismItem.contactFields.singleContact.email.getData()}";
808 <#else>
809 var eventEmail = "iatcuneo@visitcuneese.it";
810 </#if>
811</script>
812
813<#function cleanCategories categories>
814 <#assign
815 url = themeDisplay.getURLCurrent()
816 fixedCats = []
817 />
818
819 <#if url?contains("fiera-del-porro-cervere")>
820 <#list categories as cat>
821 <#if cat?lower_case != "fossano">
822 <#assign fixedCats += [cat]>
823 </#if>
824 </#list>
825
826 <#return fixedCats>
827 </#if>
828
829 <#return categories>
830</#function>
it_IT
Cosa
fare
it_IT
Esperienze
it_IT
Dove
dormire
it_IT
Offerte
it_IT
Info
Richiedi informazioni su questo evento
Il messaggio è stato inviato correttamente.
L'invio del messaggio non è andato a buon fine. Per favore riprova.
Letta l'informativa sul trattamento dei dati personali, acconsento: