An error occurred while processing the template.
The following has evaluated to null or missing: ==> result.getJSONObject("data").getJSONArray("items") [in template "1084819#1084854#4104773" at line 26, column 11] ---- 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: doc = result.getJSONObject("data").ge... [in template "1084819#1084854#4104773" at line 26, column 5] - Reached through: #assign-container [in template "1084819#1084854#4104773" at line 24, column 1] ----
1<#import "_TEMPLATE_CONTEXT_/1084819/1099604/23609/2387505" as d40>
2
3<#assign
4 SRLS = serviceLocator.findService("eu.suggesto.servicecs.service.SuggestoRecommenderLocalService")
5 PUTIL = objectUtil("com.liferay.portal.kernel.util.PortalUtil")
6 jsonParams = result.getNamespacedParameters().getString("jsonParams")
7 serviceName = "tdm40"
8 collection = "tdm_sila"
9 query = "{'id': 0}"
10 id = ""
11/>
12
13<#if jsonParams?has_content>
14 <#assign
15 params = d40.createObject(jsonParams)
16 id = params.getString("id")
17 />
18
19 <#if id?has_content>
20 <#assign query = "{'id': ${id}}">
21 </#if>
22</#if>
23
24<#assign
25 result = SRLS.search("0", serviceName, collection, query, "", 0, 1)
26 doc = result.getJSONObject("data").getJSONArray("items").getJSONObject(0)
27/>
28
29<#if doc.getString("title")?has_content>
30 ${PUTIL.setPageTitle(doc.getString("title")?capitalize, request)}
31</#if>
32
33<section id="banner" class="tw:h-[20vh] lg:tw:h-[45vh] tw:overflow-hidden">
34 <div class="card card-flat tw:w-full tw:h-full">
35 <img data-src="${doc.op_img_url}" loading="lazy" class="lazyload tw:w-full tw:h-full tw:object-cover" alt="${doc.title?js_string}"/>
36 <div class="card-img-overlay tw:bg-gradient-to-b tw:from-transparent tw:via-trasparent tw:to-dark/40 <lg:tw:hidden"></div>
37 </div>
38</section>
39
40
41
42<div class="container tw:my-10 lg:tw:my-20">
43 <div class="card-row">
44 <div class="autofit-col autofit-col-expand">
45 <div class="autofit-section">
46 <p class="tw:text-dark tw:text-2xl tw:font-semibold tw:mb-5 lg:tw:text-5xl">
47 ${doc.title}
48 </p>
49 </div>
50 </div>
51 <div class="autofit-col tw:mt-auto <lg:tw:hidden">
52 <a href="/dormire" class="btn btn-block tw:border-2 tw:border-dark tw:text-dark tw:text-base hover:tw:bg-dark hover:tw:text-white tw:transition-colors tw:duration-300 tw:py-4 tw:inline-block">
53 ${d40.getLabel("torna_indietro")}
54 </a>
55 </div>
56 </div>
57</div>
58
59<div class="tw:bg-lightgray">
60 <div class="container tw:py-10">
61 <div class="row">
62 <div class="col-12 col-lg-6">
63 <div class="aspect-ratio aspect-ratio-4-to-3 tw:rounded-md">
64 <img data-src="${doc.op_img_url}" loading="lazy" class="lazyload aspect-ratio-item-fluid tw:w-full tw:h-full tw:object-cover" alt="${doc.title?js_string}" />
65 </div>
66 </div>
67
68 <div class="col-12 col-lg-6">
69 <div class="lg:tw:ml-10 <lg:tw:mt-10">
70 <div class="tw:space-y-4 tw:mb-5">
71 <div class="card-row tw:space-x-3">
72 <div class="autofit-col">
73 <div class="autofit-section">
74 <div class="center-child tw:border-2 tw:border-dark tw:rounded-full tw:h-20 tw:w-20">
75 <i class="fas fa-paw tw:text-dark fa-2x"></i>
76 </div>
77 </div>
78 </div>
79 <div class="autofit-col autofit-col-expand">
80 <div class="autofit-section">
81 <p class="tw:text-dark tw:font-semibold tw:uppercase tw:mb-2">${d40.getLabel("animali_ammessi")}</p>
82 <p class="tw:text-dark text-capitalize">${doc.op_animals}</p>
83 </div>
84 </div>
85 </div>
86 </div>
87
88 <div class="tw:space-y-4 tw:mb-5">
89 <div class="card-row tw:space-x-3">
90 <div class="autofit-col">
91 <div class="autofit-section">
92 <div class="center-child tw:border-2 tw:border-dark tw:rounded-full tw:h-20 tw:w-20">
93 <i class="fas fa-restroom tw:text-dark fa-2x"></i>
94 </div>
95 </div>
96 </div>
97 <div class="autofit-col autofit-col-expand">
98 <div class="autofit-section">
99 <p class="tw:text-dark tw:font-semibold tw:uppercase tw:mb-2">${d40.getLabel("bagno")}</p>
100 <p class="tw:text-dark text-capitalize">${doc.op_bathroom}</p>
101 </div>
102 </div>
103 </div>
104 </div>
105
106 <div class="tw:space-y-4 tw:mb-5">
107 <div class="card-row tw:space-x-3">
108 <div class="autofit-col">
109 <div class="autofit-section">
110 <div class="center-child tw:border-2 tw:border-dark tw:rounded-full tw:h-20 tw:w-20">
111 <i class="fas fa-bed-alt tw:text-dark fa-2x"></i>
112 </div>
113 </div>
114 </div>
115 <div class="autofit-col autofit-col-expand">
116 <div class="autofit-section">
117 <p class="tw:text-dark tw:font-semibold tw:uppercase tw:mb-2">${d40.getLabel("camera_letto")}</p>
118 <p class="tw:text-dark text-capitalize">${doc.op_bedroom}</p>
119 </div>
120 </div>
121 </div>
122 </div>
123
124 <div class="tw:space-y-4 tw:mb-5">
125 <div class="card-row tw:space-x-3">
126 <div class="autofit-col">
127 <div class="autofit-section">
128 <div class="center-child tw:border-2 tw:border-dark tw:rounded-full tw:h-20 tw:w-20">
129 <i class="fas fa-wifi tw:text-dark fa-2x"></i>
130 </div>
131 </div>
132 </div>
133 <div class="autofit-col autofit-col-expand">
134 <div class="autofit-section">
135 <p class="tw:text-dark tw:font-semibold tw:uppercase tw:mb-2">Internet</p>
136 <p class="tw:text-dark text-capitalize">${doc.op_internet}</p>
137 </div>
138 </div>
139 </div>
140 </div>
141
142 <div class="tw:space-y-4 tw:mb-5">
143 <div class="card-row tw:space-x-3">
144 <div class="autofit-col">
145 <div class="autofit-section">
146 <div class="center-child tw:border-2 tw:border-dark tw:rounded-full tw:h-20 tw:w-20">
147 <i class="fas fa-utensils tw:text-dark fa-2x"></i>
148 </div>
149 </div>
150 </div>
151 <div class="autofit-col autofit-col-expand">
152 <div class="autofit-section">
153 <p class="tw:text-dark tw:font-semibold tw:uppercase tw:mb-2">${d40.getLabel("cucina")}</p>
154 <p class="tw:text-dark text-capitalize">${doc.op_kitchen}</p>
155 </div>
156 </div>
157 </div>
158 </div>
159
160 <div class="tw:space-y-4 tw:mb-5">
161 <div class="card-row tw:space-x-3">
162 <div class="autofit-col">
163 <div class="autofit-section">
164 <div class="center-child tw:border-2 tw:border-dark tw:rounded-full tw:h-20 tw:w-20">
165 <i class="fas fa-parking tw:text-dark fa-2x"></i>
166 </div>
167 </div>
168 </div>
169 <div class="autofit-col autofit-col-expand">
170 <div class="autofit-section">
171 <p class="tw:text-dark tw:font-semibold tw:uppercase tw:mb-2">${d40.getLabel("parcheggio")}</p>
172 <p class="tw:text-dark text-capitalize">${doc.op_parking}</p>
173 </div>
174 </div>
175 </div>
176 </div>
177
178 <#--
179 <div class="card-row">
180 <div class="autofit-col">
181 <div class="autofit-section">
182 <a href="#request-info" class="btn btn-block tw:border-2 tw:border-dark tw:text-dark tw:text-base hover:tw:bg-dark hover:tw:text-white tw:transition-colors tw:duration-300 tw:py-4 tw:uppercase tw:px-5">
183 ${d40.getLabel("richiedi_info")}
184 </a>
185 </div>
186 </div>
187 </div>
188 -->
189 </div>
190 </div>
191 </div>
192 </div>
193</div>
194
195<#if doc.op_gallery?has_content>
196 <div id="gallery" class="container tw:relative tw:my-10">
197 <div class="swiper-container">
198 <button type="button" class="btn-prev semicircle-right tw:bg-dark/70 tw:w-7 tw:h-14 tw:left-0 tw:top-2/4 tw:-translate-y-2/4 tw:absolute tw:z-5">
199 <span class="sr-only">${d40.getLabel("precedente")}</span>
200 <i class="fal fa-chevron-left tw:text-white"></i>
201 </button>
202 <button type="button" class="btn-next semicircle-left tw:bg-dark/70 tw:w-7 tw:h-14 tw:right-0 tw:top-2/4 tw:-translate-y-2/4 tw:absolute tw:z-5">
203 <span class="sr-only">${d40.getLabel("successivo")}</span>
204 <i class="fal fa-chevron-right tw:text-white"></i>
205 </button>
206
207 <div class="swiper-wrapper">
208 <#list doc.op_gallery?split(",") as slide>
209 <div class="swiper-slide">
210 <a href="javascript:void(0);" data-toggle="modal" data-target="#lightbox-modal" data-slider="${slide?index}">
211 <div class="aspect-ratio aspect-ratio-4-to-3 tw:rounded-md tw:shadow-2xl">
212 <img data-src="${slide}" loading="lazy" class="lazyload aspect-ratio-item-fluid tw:object-cover tw:w-full tw:h-full" alt="image ${slide?counter}" />
213 </div>
214 </a>
215 </div>
216 </#list>
217 </div>
218 </div>
219 </div>
220
221 <div id="lightbox-modal" tabindex="-1" role="dialog" class="modal fade">
222 <div class="modal-dialog modal-full-screen tw:inset-0 tw:border-none tw:shadow-none">
223 <div class="modal-content tw:bg-transparent">
224 <div class="modal-body tw:overflow-hidden">
225 <div class="tw:absolute tw:top-0 tw:right-0 tw:z-5">
226 <button type="button" data-dismiss="modal" class="btn btn-monospaced btn-secondary m-3">
227 <i class="fal fa-times fa-lg"></i>
228 </button>
229 </div>
230 <div id="lightbox-swiper" class="swiper-container tw:h-3/4 tw:my-auto">
231 <div class="swiper-button-prev tw:w-12 tw:h-12">
232 <span class="sticker sticker-circle tw:bg-green tw:w-full tw:h-full">
233 <span class="sticker-overlay">
234 <i class="fas fa-chevron-left fa-2x tw:text-white"></i>
235 </span>
236 </span>
237 </div>
238 <div class="swiper-button-next tw:w-12 tw:h-12">
239 <span class="sticker sticker-circle tw:bg-green tw:w-full tw:h-full">
240 <span class="sticker-overlay">
241 <i class="fas fa-chevron-right fa-2x tw:text-white"></i>
242 </span>
243 </span>
244 </div>
245 <div class="swiper-wrapper tw:h-full">
246 <#list doc.op_gallery?split(",") as slide>
247 <div class="swiper-slide tw:h-full">
248 <img data-src="${slide}" loading="lazy" class="lazyload tw:h-full tw:object-contain tw:mx-auto" alt="image ${slide?counter}" />
249 </div>
250 </#list>
251 </div>
252 </div>
253 <div id="thumbnail-swiper" class="swiper-container">
254 <div class="swiper-wrapper">
255 <#list doc.op_gallery?split(",") as slide>
256 <div class="swiper-slide">
257 <img data-src="${slide}" loading="lazy" class="lazyload tw:object-cover tw:cursor-pointer tw:h-full tw:w-full" alt="image ${slide?counter}" />
258 </div>
259 </#list>
260 </div>
261 </div>
262 </div>
263 </div>
264 </div>
265 </div>
266</#if>
267
268<#if doc.content?has_content>
269 <div class="container tw:my-10 lg:tw:my-20">
270 <p class="tw:text-dark tw:text-xl tw:font-semibold tw:mb-5 lg:tw:text-4xl">${d40.getLabel("nel_dettaglio")}</p>
271 <p class="tw:text-dark">
272 ${doc.content}
273 </p>
274 </div>
275</#if>
276
277<section id="contacts" class="tw:my-20">
278 <div class="tw:bg-lightgray">
279 <div class="container tw:py-5 lg:tw:py-25">
280 <p class="tw:text-dark tw:text-xl tw:font-semibold tw:uppercase tw:mb-10 lg:tw:text-3xl lg:mb-15">
281 ${d40.getLabel("dati_contatto")}
282 </p>
283 <div class="row">
284 <div class="col-12 col-lg-6">
285 <div class="card-row tw:space-x-3 tw:mb-4">
286 <div class="autofit-col">
287 <div class="autofit-section">
288 <div class="center-child tw:border-2 tw:border-dark tw:rounded-md tw:h-10 tw:w-10">
289 <span class="sr-only">Location</span>
290 <i class="fas fa-map-marker-alt tw:text-dark fa-lg"></i>
291 </div>
292 </div>
293 </div>
294 <div class="autofit-col autofit-col-expand">
295 <div class="autofit-section">
296 <p class="tw:text-dark">
297 ${doc.op_address}
298 </p>
299 </div>
300 </div>
301 </div>
302 </div>
303 </div>
304 </div>
305 </div>
306</section>
307
308<#if doc.op_gallery?has_content>
309 <script>
310 document.addEventListener("DOMContentLoaded", () => {
311 new Swiper("#gallery .swiper-container", {
312 slidesPerView: 1,
313 spaceBetween: 25,
314 centerSlides: true,
315 centerInsufficientSlides: true,
316 navigation: {
317 prevEl: ".btn-prev",
318 nextEl: ".btn-next",
319 },
320 breakpoints: {
321 768: {
322 slidesPerView: 2,
323 spaceBetween: 25,
324 },
325 992: {
326 slidesPerView: 3,
327 spaceBetween: 25,
328 },
329 },
330 });
331
332 var thumbnails = new Swiper("#thumbnail-swiper", {
333 spaceBetween: 10,
334 slidesPerView: 2,
335 centerInsufficientSlides: true,
336 freeMode: true,
337 watchSlidesVisibility: true,
338 watchSlidesProgress: true,
339 breakpoints: {
340 768: {
341 slidesPerView: 3,
342 },
343 992: {
344 slidesPerView: 4,
345 },
346 1200: {
347 slidesPerView: 5,
348 },
349 },
350 });
351
352 var lightbox = new Swiper("#lightbox-swiper", {
353 spaceBetween: 10,
354 autoHeight: true,
355 observer: true,
356 observeSlideChildren: true,
357 keyboard: {
358 enabled: true,
359 },
360 navigation: {
361 nextEl: ".swiper-button-next",
362 prevEl: ".swiper-button-prev",
363 },
364 thumbs: {
365 swiper: thumbnails,
366 },
367 });
368
369 $("#lightbox-modal").on("shown.bs.modal", function (e) {
370 lightbox.update();
371 thumbnails.update();
372 lightbox.slideTo($(e.relatedTarget).data("slider"));
373 lightbox.update();
374 });
375
376 $("#lightbox-modal .swiper-wrapper").on("click", function (e) {
377 if ($(e.target).attr("class").includes("swiper-slide")) {
378 $("#lightbox-modal").modal("hide");
379 }
380 });
381 });
382 </script>
383</#if>