The following has evaluated to null or missing:
==> listDates [in template "1315478#1315513#2234713" at line 313, 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 313, 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 tourismItem.hideMap?? && tourismItem.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 <#else>
297 <div class="mt-2"></div>
298 </#if>
299
300
301 <#-- DOVE -->
302 <#if indirizzoEvento?? && indirizzoEvento.getData()?has_content>
303 <div class="ev-short-info d-flex">
304 <i class="far fa-map-marker-alt"></i>
305 <div class="d-flex flex-column">
306 <strong>${getLabel("dove")}</strong>
307 <span>${indirizzoEvento.getData()}</span>
308 </div>
309 </div>
310 </#if>
311
312 <#-- PERIODO -->
313 <#if (listDates.DateRange.dataInizio?? && listDates.DateRange.dataInizio.getData()?has_content) || (listDates.DateRange.dataFine?? && listDates.DateRange.dataFine.getData()?has_content)>
314 <div class="ev-short-info d-flex">
315 <i class="fal fa-calendar-alt"></i>
316 <div class="d-flex flex-column">
317 <strong>${getLabel("periodo")}</strong>
318
319 <#assign separatore = "">
320 <#assign startDate = "">
321
322 <#if listDates.DateRange.dataInizio?? && listDates.DateRange.dataInizio.getData()?has_content>
323 <#assign startDate = listDates.DateRange.dataInizio.getData()>
324 <#assign separatore = " - ">
325 ${getContentDate(startDate, "dd MMMM yyyy")}
326 </#if>
327
328 <#if listDates.DateRange.dataFine?? && listDates.DateRange.dataFine.getData()?has_content>
329 <#assign endDate = listDates.DateRange.dataFine.getData()>
330 <#if startDate != endDate>
331 ${separatore}${getContentDate(endDate, "dd MMMM yyyy")}
332 </#if>
333 </#if>
334 </div>
335 </div>
336 </#if>
337
338 <#-- CONTATTI -->
339 <section id="${portletNamespace}" class="mt-3">
340
341 <#if (tourismItem.contactFields.singleContact.getData())??>
342 <#assign contacts = tourismItem.contactFields.singleContact />
343 </#if>
344
345 <#if contacts??>
346 <div class="ev-short-info d-flex">
347 <i class="fal fa-clipboard-user"></i>
348
349 <div class="d-flex flex-column">
350 <strong>${getLabel("contatti")}:</strong>
351 <#if contacts.contactName?? && contacts.contactName.getData()?has_content>
352 <span>${contacts.contactName.getData()}</span>
353 </#if>
354
355 <@indirizzo/>
356
357 <#if contacts.tel?? && contacts.tel.getSiblings()?has_content>
358 <#list contacts.tel.getSiblings() as phone>
359 <#if phone.getData()?has_content>
360 <span><a href="tel:${phone.getData()}">${phone.getData()}</a></span>
361 </#if>
362 </#list>
363 </#if>
364
365 <#if contacts.email?? && contacts.email.getData()?has_content>
366 <span><a href="mailto:${contacts.email.getData()}" target="_blank">${contacts.email.getData()}</a></span>
367 </#if>
368 <#if contacts.email2?? && contacts.email2.getData()?has_content>
369 <span><a href="mailto:${contacts.email2.getData()}" target="_blank">${contacts.email2.getData()}</a></span>
370 </#if>
371
372 <#if contacts.webSite?? && contacts.webSite.getData()?has_content>
373 <span><a href="${contacts.webSite.getData()}" target="_blank">${getLabel('sito-web')}</a></span>
374 </#if>
375
376 <div class="d-flex">
377 <#if contacts.facebook?? && contacts.facebook.getData()?has_content>
378 <a href="${contacts.facebook.getData()}" class="btn btn-social mr-3 mt-3" target="_blank">
379 <i class="fab fa-facebook-f fa-lg"></i>
380 </a>
381 </#if>
382
383 <#if contacts.instagram?? && contacts.instagram.getData()?has_content>
384 <a href="${contacts.instagram.getData()}" class="btn btn-social mr-3 mt-3" target="_blank">
385 <i class="fab fa-instagram fa-lg"></i>
386 </a>
387 </#if>
388 </div>
389
390 <#if contacts.altreInfo?? && contacts.altreInfo.getData()?has_content>
391 <div class="mt-4 d-flex flex-column">
392 <strong>${getLabel("informazioni_utili")}:</strong>
393 <span>${contacts.altreInfo.getData()}</span>
394 </div>
395 </#if>
396 </div>
397 </div>
398 </#if>
399
400 </section>
401
402 <#-- RICHIEDI INFO -->
403 <a href="#contact-form" class="smooth-scroll underline-btn underline-green">
404 ${getLabel("richiedi_info")}:
405 </a>
406
407 </div>
408 </div>
409 </div>
410
411 <#-- MASONRY GALLERY -->
412 <#if hasGallery>
413 <section id="gallery" class="mt-4">
414 <div class="container-fluid custom-container">
415 <div class="gallery-grid grid">
416 <#list tourismItem.ImmagineGallery.getSiblings() as pic>
417 <div class="grid-item">
418 <a href="javascript:void(0);" data-toggle="modal" data-target="#lightbox-modal" data-slider="${pic?index}">
419 <img src="${getKitPrefix(pic.getData(), 'tr:w-900,fo-center')}" alt="${pic.getAttribute('alt')!''}" />
420 </a>
421 </div>
422 </#list>
423 </div>
424 </div>
425
426 <div id="lightbox-modal" tabindex="-1" role="dialog" class="modal fade">
427 <div class="modal-dialog modal-full-screen tw:inset-0 tw:border-none tw:shadow-none">
428 <div class="modal-content tw:bg-transparent">
429 <div class="modal-body tw:overflow-hidden">
430 <div class="tw:absolute tw:top-0 tw:right-0 tw:z-5">
431 <button type="button" data-dismiss="modal" class="btn btn-monospaced btn-secondary m-3">
432 <i class="fal fa-times fa-lg"></i>
433 </button>
434 </div>
435
436 <#-- lightbox -->
437 <div id="lightbox-swiper" class="swiper-container h-75 my-auto">
438 <div class="swiper-button-prev tw:w-12 tw:h-12">
439 <span class="sticker sticker-circle hcm-bg-capable tw:bg-green tw:w-full tw:h-full">
440 <span class="sticker-overlay">
441 <i class="fas fa-chevron-left fa-2x tw:text-white"></i>
442 </span>
443 </span>
444 </div>
445
446 <div class="swiper-button-next tw:w-12 tw:h-12">
447 <span class="sticker sticker-circle hcm-bg-capable tw:bg-green tw:w-full tw:h-full">
448 <span class="sticker-overlay">
449 <i class="fas fa-chevron-right fa-2x tw:text-white"></i>
450 </span>
451 </span>
452 </div>
453
454 <div class="swiper-wrapper tw:h-full">
455 <#list tourismItem.ImmagineGallery.getSiblings() as pic>
456 <div class="swiper-slide tw:h-full">
457 <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')!''}">
458 </div>
459 </#list>
460 </div>
461 </div>
462
463 <#-- thumbnails -->
464 <div id="thumbnail-swiper" class="swiper-container" thumbsSlider="">
465 <div class="swiper-wrapper">
466 <#list tourismItem.ImmagineGallery.getSiblings() as pic>
467 <div class="swiper-slide">
468 <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')!''}">
469 </div>
470 </#list>
471 </div>
472 </div>
473 </div>
474 </div>
475 </div>
476 </div>
477 </section>
478 </#if>
479
480 <#assign hasDownloads = false>
481 <#if downloads?? && downloads.getSiblings()?has_content>
482 <#list downloads.getSiblings() as item>
483 <#if item.downloadUrl.getData()?has_content>
484 <#assign hasDownloads = true>
485
486 <#break>
487 </#if>
488 </#list>
489 </#if>
490
491
492 <#if hasDownloads >
493 <section id="downloads" >
494 <div class="container tw:mt-20">
495 <div class="sheet tw-bg-light tw:space-y-4 p-3">
496 <#list downloads.getSiblings() as item>
497 <#-- #assign doc = getFileFromUuid(createObject(item.downloadUrl.data).uuid, groupId) -->
498
499 <div class="card tw:bg-transparent tw:border-0 tw:shadow-none">
500 <div class="card-row">
501 <div class="autofit-col">
502 <div class="autofit-section">
503 <i class="fal fa-file-pdf fa-lg tw:text-dark"></i>
504 </div>
505 </div>
506 <div class="autofit-col autofit-col-expand autofit-col-gutters">
507 <div class="autofit-section">
508 <a href="${item.downloadUrl.getData()}" class="tw:text-dark tw:font-bold" download>
509 <#-- ${doc.fileName} -->
510 ${item.downloadText.getData()}
511
512 <span class="tw:font-light muted tw:ml-2">(scarica qui)</span>
513 </a>
514 </div>
515 </div>
516 </div>
517 </div>
518 </#list>
519 </div>
520 </div>
521 </section>
522 </#if>
523
524</div>
525
526<#macro indirizzo>
527 <#assign
528 street_number1Sz=""
529 localitaSz=""
530 comuneSz=""
531 countrySz=""
532 zipCodeSz=""
533 thereAreAddress="false"
534 />
535
536 <#if contacts.street_number1?? && contacts.street_number1.getData()?has_content>
537 <#assign street_number1Sz=contacts.street_number1.getData()>
538 <#assign thereAreAddress="true">
539 </#if>
540 <#if contacts.localita?? && contacts.localita.getData()?has_content>
541 <#assign localitaSz=contacts.localita.getData()>
542 <#assign thereAreAddress="true">
543 </#if>
544 <#if contacts.comune?? && contacts.comune.getData()?has_content>
545 <#assign comuneSz=contacts.comune.getData()>
546 <#assign thereAreAddress="true">
547 </#if>
548 <#if contacts.country?? && contacts.country.getData()?has_content>
549 <#assign countrySz=contacts.country.getData()>
550 <#assign thereAreAddress="true">
551 </#if>
552 <#if contacts.zipCode?? && contacts.zipCode.getData()?has_content>
553 <#assign zipCodeSz=contacts.zipCode.getData()>
554 <#assign thereAreAddress="true">
555 </#if>
556
557 <#assign acapo="false">
558 <#if thereAreAddress == "true">
559 <p class="tw:text-dark tw:font-light tw:text-lg tw:mt-5">
560 <#if street_number1Sz != "">
561 <#if acapo == "true"><br/></#if>
562 ${street_number1Sz}
563 <#assign acapo="true">
564 </#if>
565 <#if localitaSz != "">
566 <#if acapo == "true"><br/></#if>
567 ${localitaSz}
568 <#assign acapo="true">
569 </#if>
570
571 <#if zipCodeSz != "" || comuneSz != "" || countrySz != "">
572 <#if acapo == "true"><br/></#if>
573 ${zipCodeSz} ${comuneSz} ${countrySz}
574 <#assign acapo="true">
575 </#if>
576 </p>
577 </#if>
578
579
580</#macro>
581
582<script src="https://s3-eu-west-1.amazonaws.com/mkspresstage.suggesto.eu/components/securityV2.js"></script>
583
584<script src="https://s3-eu-west-1.amazonaws.com/mkspresstage.suggesto.eu/components/initVueApp.js"></script>
585<script src="https://s3-eu-west-1.amazonaws.com/mkspresstage.suggesto.eu/mixins/js/favorites.js"></script>
586<script src="https://s3-eu-west-1.amazonaws.com/mkspresstage.suggesto.eu/mixins/js/share.js"></script>
587
588<script>
589 var ${portletNamespace}_custom_hook = {
590 data: {
591 debugMode: true,
592 item: {
593 id: "${articleId}",
594 contentJSON: {
595 title: "${tourismItem.title.getData()?js_string}",
596 description: "${tourismItem.introDescription.getData()?js_string}",
597 geoRef: '${tourismItem.geoRef.getData()}',
598 previewPicture: "${tourismItem.previewPicture.getData()}",
599 viewUrl: window.location.href
600 }
601 },
602 regionLat: "44.3921388",
603 regionLng: "7.5211695",
604 map: null,
605 slider: null,
606 gallery: null,
607 thumbnails: null,
608 lightbox: null,
609 docs: [],
610 },
611 mounted(){
612 var that = this;
613
614 if(${showMap?c}){
615 this.buildMap();
616 }
617
618 if(${hasSlides?c}){
619 this.initSlider();
620 }
621
622 if(${hasGallery?c}){
623 this.initGallery();
624
625 $("#lightbox-modal").on("shown.bs.modal", function(e){
626 that.lightbox.update();
627 that.thumbnails.update();
628 that.lightbox.slideTo($(e.relatedTarget).data("slider"));
629 that.lightbox.update();
630 });
631
632 $("#lightbox-modal .swiper-wrapper").on("click", function(e){
633 if($(e.target).attr("class").includes("swiper-slide")){
634 $("#lightbox-modal").modal("hide");
635 }
636 });
637 }
638 },
639 methods: {
640 buildMap: function(){
641 var layers = [],
642 markers = [],
643 map = new SuggestoMap("suggesto-map");
644
645 var marker = {
646 group: "1",
647 latlng: [parseFloat(${lat}), parseFloat(${lng})],
648 value: "",
649 type: "svgNumIcon",
650 size: "10",
651 color: "#7eba27",
652 html: ""
653 };
654
655 markers.push(marker);
656
657 var mapData = {
658 tilelayer: "osm",
659 gestureHandling: true,
660 fitBounds: false,
661 mapcenter: [parseFloat(${lat}), parseFloat(${lng})],
662 zoom: 14,
663 markersFilter: "*",
664 markers: markers,
665 layers: layers
666 };
667
668 console.log("mapData is: ", mapData);
669
670 map.sm.createMap(mapData);
671
672 this.map = map;
673 },
674 initSlider: function(){
675 this.slider = new Swiper("#slideshow .swiper-container", {
676 loop: ${(slides > 0)?c},
677 effect: "fade",
678 speed: 3000,
679 allowTouchMove: false,
680 autoplay: {
681 delay: 3000,
682 disableOnInteraction: false,
683 },
684 fadeEffect: {
685 crossFade: true,
686 },
687 });
688 },
689 initGallery: function(){
690 this.gallery = new Swiper("#gallery .swiper-container", {
691 slidesPerView: 1,
692 spaceBetween: 25,
693 centerSlides: true,
694 centerInsufficientSlides: true,
695 navigation: {
696 prevEl: ".btn-prev",
697 nextEl: ".btn-next",
698 },
699 breakpoints: {
700 768: {
701 slidesPerView: 2,
702 spaceBetween: 25,
703 },
704 992: {
705 slidesPerView: 3,
706 spaceBetween: 25,
707 },
708 },
709 });
710
711 this.thumbnails = new Swiper("#thumbnail-swiper", {
712 spaceBetween: 10,
713 slidesPerView: 2,
714 centerInsufficientSlides: true,
715 freeMode: true,
716 watchSlidesVisibility: true,
717 watchSlidesProgress: true,
718 breakpoints: {
719 768: {
720 slidesPerView: 3
721 },
722 992: {
723 slidesPerView: 4
724 },
725 1200: {
726 slidesPerView: 5
727 }
728 },
729 });
730
731 this.lightbox = new Swiper("#lightbox-swiper", {
732 spaceBetween: 10,
733 autoHeight: true,
734 observer: true,
735 observeSlideChildren: true,
736 keyboard: {
737 enabled: true
738 },
739 navigation: {
740 nextEl: ".swiper-button-next",
741 prevEl: ".swiper-button-prev"
742 },
743 thumbs: {
744 swiper: this.thumbnails
745 }
746 });
747 },
748 customShare: function(type, title, description, image = ""){
749 if(type == "facebook"){
750 var winHeight = 450,
751 winWidth = 600,
752 winTop = window.screen.height / 2 - winHeight / 2,
753 winLeft = window.screen.width / 2 - winWidth / 2,
754 params = "scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=" + winWidth + ",height=" + winHeight + ",left=" + winLeft + ",top=" + winTop,
755 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;
756
757 window.open(link, "Facebook", params);
758 }
759
760 if(type == "twitter"){
761 var link = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(title) + "&url=" + encodeURIComponent(window.location.href);
762
763 window.open(link, "_blank").focus();
764 }
765
766 if(type == "pinterest"){
767 var link = "https://pinterest.com/pin/create/button/?url=" + encodeURIComponent(window.location.href) + "&description=" + encodeURIComponent(title);
768
769 window.open(link, "_blank").focus();
770 }
771
772 if(type == "whatsapp"){
773 var link = "https://wa.me?text=" + encodeURIComponent(title + ": " + window.location.href);
774
775 window.open(link, "_blank").focus();
776 }
777
778 if(type == "telegram"){
779 var link = "https://t.me/share/url?url=" + window.location.href + "&text=" + encodeURIComponent(title);
780
781 window.open(link, "_blank").focus();
782 }
783
784 if(type == "print"){
785 window.print();
786 }
787
788 if(type == "link"){
789 this.legacyShare();
790 }
791 }
792 }
793 }
794
795 document.addEventListener("DOMContentLoaded", function(){
796 var app = initVueApp(
797 "#${portletNamespace}",
798 "${portletNamespace}",
799 [d40_favorites, d40_share, ${portletNamespace}_custom_hook]
800 );
801 });
802
803 var groupedCategories = '${groupedCategories?js_string}';
804 var contentCoords = [${lat}, ${lng}];
805 console.log("espongo " + groupedCategories);
806
807
808 <#if tourismItem.contactFields.singleContact.email?? && tourismItem.contactFields.singleContact.email.getData()?has_content>
809 var eventEmail = "${tourismItem.contactFields.singleContact.email.getData()}";
810 <#else>
811 var eventEmail = "iatcuneo@visitcuneese.it";
812 </#if>
813</script>
814
815<#function cleanCategories categories>
816 <#assign
817 url = themeDisplay.getURLCurrent()
818 fixedCats = []
819 />
820
821 <#if url?contains("fiera-del-porro-cervere")>
822 <#list categories as cat>
823 <#if cat?lower_case != "fossano">
824 <#assign fixedCats += [cat]>
825 </#if>
826 </#list>
827
828 <#return fixedCats>
829 </#if>
830
831 <#return categories>
832</#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: