Wystąpił błąd podczas przetwarzania szablonu.
The following has evaluated to null or missing: ==> locationAddress [in template "20116#20152#LOCATION-ELEMENT-DETAIL" at line 396, column 6] ---- 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: #if locationAddress.street?? && locat... [in template "20116#20152#LOCATION-ELEMENT-DETAIL" at line 396, column 1] ----
1<#-- variables -->
2<#assign categoryProductListID = 46497697>
3<#assign sNavigate = "Nawiguj">
4<#assign sOurProfile = "Sprawdź naszą wizytówkę w Google">
5<#assign sGetQuote = "Zapytaj o wycenę">
6<#assign sOpeningH = "Godziny otwarcia">
7<#assign sContactDetails = "Informacje kontaktowe">
8<#assign sProductListing = "Produkty dostępne w zakładzie">
9<#assign sLocalContacts = "Kontakt z zakładem">
10<#assign sPriceList = "Cennik produktów i usług">
11<#assign sSpecialProducts = "Oferowane produkty specjalistyczne">
12<#assign sZipShort = "Kod pocztowy">
13<#assign sGoogleCustomerReviews = "Opinie z Google">
14<#assign googleServerApiKey = "">
15<#-- /variables -->
16
17
18<link href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.css" rel="stylesheet">
19<link href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.theme.min.css" rel="stylesheet">
20<script src="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.js"></script>
21
22<style>
23 .signed-out .h2 {
24 display: none !important;
25 }
26
27 .ld-location-detail {
28 font-family: roboto-regular,sans-serif;
29 }
30
31 .ld-topline {
32 border-top: 1px solid lightgray;
33 }
34
35 .ld-topbox-heading-h1 {
36 font-size: 40px;
37 margin-right: 2em;
38 color: #023185;
39 }
40
41 .ld-topbox-heading {
42 display: flex;
43 flex-direction: row;
44 align-items: baseline;
45 flex-wrap: wrap;
46 }
47
48 .ld-topbox-heading-stars {
49 font-size: 18px;
50 }
51
52
53 .ld-topbox-heading-stars a {
54 font-size: 16px;
55 }
56
57 p.ld-topbox-address-address {
58 font-size: 26px;
59 font-weight: 500;
60 }
61
62 .ld-topbox-links {
63 display: flex;
64 flex-direction: row;
65 justify-content: space-between;
66 }
67
68 .ld-contactbox-quote a.btn {
69 border-radius: 0;
70 padding: 10px 35px;
71 text-transform: uppercase;
72 font-size: 11px;
73 font-weight: 900;
74 letter-spacing: 2px;
75 color: #FFF;
76 background-color: #356090;
77 }
78
79
80 .ld-contactbox-products-list {
81 display: flex;
82 flex-direction: row;
83 flex-wrap: wrap;
84 }
85
86 .ld-contactbox-products-list p {
87 width: 48%;
88 margin-right: 2%;
89 }
90
91 .ld-topbox-address {
92 padding-top: 20px;
93 }
94
95 .ld-box div.ld-contactbox,
96 .ld-box div.ld-peoplebox,
97 .ld-box div.ld-docubox {
98 padding: 20px 0px 40px 0;
99 }
100
101 .ld-box .ld-contactbox {
102 padding-right: 20px;
103 }
104
105 .ld-contactbox-contacts a {
106 font-weight: 500;
107 }
108
109 .ld-box .ld-aboutbox {
110 padding: 20px 20px 20px 0px;
111 }
112
113 .ld-box div.ld-rangebox {
114 padding-top: 40px;
115 }
116
117 .ld-box p {
118 padding: 0;
119 font-size: 16px;
120 }
121
122 .ld-box .ld-peoplebox-list-contact-name {
123 font-weight: 500;
124 }
125
126 .ld-backimage {
127 background-color: #cccccc;
128 background-position: center;
129 background-repeat: no-repeat;
130 background-size: cover;
131 border: 0;
132 }
133
134 .ld-box .ld-topbox-address-address {
135 padding-bottom: 20px;
136 }
137
138 .ld-box h4,
139 .ld-box h3 {
140 font-size: 18px;
141 font-weight: 500;
142 padding-bottom: 0.75em;
143 color: black;
144 }
145
146 .ld-box h3 {
147 font-size: 26px;
148 }
149
150 .ld-contactbox-contacts,
151 .ld-contactbox-hours,
152 .ld-contactbox-products {
153 padding-bottom: 20px;
154 }
155
156 .ld-peoplebox-list-contact {
157 display: flex;
158 margin-right: 50px;
159 margin-bottom: 20px;
160 flex-direction: column;
161 }
162
163 .ld-peoplebox-list {
164 display: flex;
165 flex-direction: row;
166 justify-content: flex-start;
167 flex-wrap: wrap;
168 }
169
170 .ld-rangebox-list {
171 display: flex;
172 flex-direction: row;
173 overflow: hidden;
174 }
175
176 .ld-rangebox-list-card {
177 display: flex;
178 flex-direction: column;
179 }
180
181 .ld-gallerybox {
182 overflow: hidden;
183 }
184
185 .ld-gallerybox-imageholder {
186 width: 100%;
187 max-height: 420px;
188 height: calc(50vw / 1.5);
189 }
190
191 @media only screen and (max-width: 1023px) {
192 .ld-gallerybox-imageholder {
193 height: calc(70vw);
194 }
195 }
196
197 .ld-rangebox-list-card {
198 border: solid 1px lightgray;
199 border-left: 0;
200 color: black;
201 <#-- margin-right: -1px;
202 margin-bottom: -1px; -->
203 flex-grow: 1;
204 }
205
206 .ld-rangebox-list-card-image {
207 width: 100%;
208 height: calc(25vw / 2.3);
209 min-height: 150px;
210 display: flex;
211 align-items: center;
212 justify-content: center;
213 padding: 20px;
214 }
215
216 .ld-rangebox-list-card-text {
217 padding: 18px 40px;
218 }
219
220 h4.ld-rangebox-list-card-text-h {
221 font-size: 26px;
222 }
223
224 .ld-docubox-list {
225 display: flex;
226 align-items: center;
227 flex-direction: row;
228 flex-wrap: wrap;
229 }
230
231 a.ld-docubox-list-doc {
232 margin-right: 80px;
233 font-size: 12px;
234 text-decoration: underline;
235 }
236
237 img.inline-align-self-middle {
238 max-height: 35px;
239 margin-right: 5px;
240 margin-top: 5px;
241 }
242
243 .ld-docubox-list-file {
244 display: flex;
245 align-items: center;
246 margin-bottom: 0.5em;
247 }
248
249 .ld-box .fa-file-pdf {
250 color: red;
251 }
252
253 .ld-box .fa-file-word {
254 color: darkblue;
255 }
256
257 .ld-box .fa-file-excel {
258 color: darkgreen;
259 }
260
261 /* carousels */
262
263 #carousel-products .owl-item:first-child a.ld-rangebox-list-card
264 {
265 border: solid 1px lightgray;
266 }
267
268
269 .owl-carousel .owl-wrapper,
270 .owl-carousel .owl-item,
271 #carousel-products .owl-wrapper {
272 display: flex!important;
273 }
274
275 #carousel-gallery .owl-wrapper-outer,
276 #carousel-gallery .owl-wrapper,
277 #carousel-gallery .owl-item {
278 height: 100%;
279 }
280
281 #carousel-gallery.owl-theme .owl-controls {
282 margin-top: -30px;
283 }
284
285 #carousel-gallery.owl-theme #progressBar {
286 height: 6px;
287 background-color: #3FA9F5;
288 position: relative;
289 }
290
291 #carousel-gallery.owl-theme #progressBar #bar {
292 height: 6px;
293 background-color: #003875;
294 }
295
296 #carousel-gallery.owl-theme .owl-controls .owl-page span {
297 background: #fff;
298 width: 12px;
299 height: 12px;
300 opacity: 0.99 !important;
301 transition: all 0.4s ease;
302 }
303
304 #carousel-gallery.owl-theme .owl-controls .owl-page.active span,
305 #carousel-gallery.owl-theme .owl-controls.clickable .owl-page:hover span {
306 background: #3FA9F5;
307 }
308
309 #carousel-gallery.owl-theme .owl-controls .owl-page:not(.active) span:hover {
310 transition: none;
311 box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.7);
312 }
313
314 #carousel-gallery.owl-theme .image-overlay {
315 position: absolute;
316 width: 100%;
317 height: 100%;
318 background: linear-gradient(to top, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.41) 60%, rgba(0, 0, 0, 0.7));
319 }
320
321 /* carousel nav */
322
323 #carousel-products .owl-wrapper {
324 z-index: 100;
325 }
326
327 #carousel-products .owl-controls.clickable {
328 position: absolute;
329 top: 0;
330 height: 100%;
331 width: 100%;
332 flex-direction: row;
333 margin-top: 0;
334 }
335
336 #carousel-products .owl-buttons {
337 height: 100%;
338 display: flex;
339 flex-direction: row;
340 justify-content: space-between;
341 align-items: center;
342 }
343
344 #carousel-products .owl-buttons .owl-prev,
345 #carousel-products .owl-buttons .owl-next {
346 border-radius: 0;
347 text-align: center;
348 display: flex;
349 align-items: center;
350 z-index: 200;
351 color: #5A5D66;
352 font-size: 36px;
353 margin: 0;
354 background: 0;
355 padding: 10px 5px;
356 }
357
358 .ld-rangebox-list-card-logo {
359 width: 200px;
360 }
361
362</style>
363
364<link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" rel="stylesheet" />
365
366
367<#-- get Google Api Key from site settings -->
368<#assign group = themeDisplay.getScopeGroup()>
369<#assign gApiKey = group.getTypeSettingsProperty("googleMapsAPIKey")!"key_is_missing">
370
371
372<#assign dateFormat = "d. MMMM yyyy" />
373<#setting locale=locale.toString()>
374<#-- the langPrefix is used to recieve a google API request in specigfic language - in troubles set it manualy -->
375<#assign langPrefix = locale?keep_before("_")>
376
377<#assign dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
378<#assign httpUtil = staticUtil["com.liferay.portal.kernel.util.HttpUtil"] />
379
380
381<#assign journalArticleId = .vars['reserved-article-id'].data>
382<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService('com.liferay.journal.service.JournalArticleResourceLocalService')>
383<#assign assetCategoryLocalServiceUtil = serviceLocator.findService('com.liferay.asset.kernel.service.AssetCategoryService')>
384
385<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/>
386<#assign categoryList=assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",articleResourcePK) >
387
388<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
389<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
390<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
391
392<#-- build address line -->
393<#assign address = []>
394<#assign addressLine = "">
395<!-- Cemex PL specific -->
396<#if locationAddress.street?? && locationAddress.street.getData() !="">
397 <#assign address = address + [locationAddress.street.getData()]>
398</#if>
399<#if locationAddress.postcode?? && locationAddress.postcode.getData() !="">
400 <#assign address = address + [locationAddress.postcode.getData()]>
401</#if>
402<#if locationAddress.city?? && locationAddress.city.getData() !="">
403 <#assign address = address + [locationAddress.city.getData()]>
404</#if>
405<#if locationAddress.region?? && locationAddress.region.getData() !="">
406 <#assign address = address + [locationAddress.region.getData()]>
407</#if>
408<#if locationAddress.area?? && locationAddress.area.getData() !="">
409 <#assign address = address + [locationAddress.area.getData()]>
410</#if>
411<#if locationAddress.country?? && locationAddress.country.getData() !="">
412 <#assign address = address + [locationAddress.country.getData()]>
413</#if>
414<!-- Cemex PL specific -->
415<#list address as part_address>
416 <#assign addressLine = addressLine + part_address>
417 <#if part_address?has_next>
418 <#assign addressLine = addressLine + ", ">
419 </#if>
420</#list>
421
422<#-- set GEO -->
423<#if geoLoc_customgeolocation.getData() != "">
424 <#assign geolocationJSONObject = jsonFactoryUtil.createJSONObject(geoLoc_customgeolocation.getData())>
425 <#assign latitude = geolocationJSONObject.getDouble("latitude")>
426 <#assign longitude = geolocationJSONObject.getDouble("longitude")>
427 <#assign geo = true>
428<#else>
429 <#assign geo = false>
430</#if>
431
432<#-- analyze google place -->
433<#assign gLocationRate = 0>
434<#assign gLocationUser_rates = 0>
435<#assign gLocationStars = 0>
436<#assign gLocationUrl = "#">
437
438<#if googleServerApiKey?has_content && GoogleLocationID?? && GoogleLocationID.getData() != "">
439 <#assign googleApiKey = gApiKey/>
440 <#assign httpUtil = staticUtil["com.liferay.portal.kernel.util.HttpUtil"] />
441 <#assign response = httpUtil.URLtoString("") >
442 <#assign resp = response?eval>
443 <#if resp.result??>
444 <#if resp.result.rating??>
445 <#assign gLocationRate = resp.result.rating>
446 <#assign gLocationUser_rates = resp.result.user_ratings_total>
447 <#assign gLocationStars = countStars(gLocationRate)>
448 <#assign gLocationUrl = resp.result.url>
449 </#if>
450 <#if resp.result.opening_hours??>
451 <#assign gLocationWeekdays = resp.result.opening_hours.weekday_text>
452 </#if>
453 <#-- if bad respond -->
454 <#elseif resp.status?? && resp.error_message??>
455 <p>Google palace API: ${resp.status}<BR>
456 Message: ${resp.error_message}</p>
457 <#elseif resp.status??>
458 <p>Google palace API: ${resp.status}</p>
459 </#if>
460</#if>
461
462
463<article class="ld-location-detail">
464 <div class="row" style="margin-top:40px">
465 <div class="ld-wrapper col-xs-12">
466
467 <div class="">
468 <div class="container">
469 <div class="row ld-box">
470 <div class="col-xs-12 ld-topbox">
471 <div class="ld-topbox-heading">
472 <h1 class="ld-topbox-heading-h1">${locationName.getData()}</h1>
473 <#if gLocationRate gte 3>
474 <span class="ld-topbox-heading-stars">${gLocationRate} ${gLocationStars} | <a href="${gLocationUrl}" target="_blank">${gLocationUser_rates} ${sGoogleCustomerReviews}</a></span>
475 </#if>
476 </div>
477 <div class="ld-topbox-address">
478 <p class="ld-topbox-address-address">${addressLine}</p>
479 </div>
480 <div class="ld-topbox-links">
481 ${geo?then('<a target="_blank" href="https://google.com/maps/dir//${latitude},${longitude}">${sNavigate}</a>', '')}
482 <#if gLocationUrl != "#">
483 <a href="${gLocationUrl}" target="_blank">${sOurProfile}</a>
484 </#if>
485 </div>
486 </div>
487 </div>
488 </div>
489 </div>
490
491 <div class="ld-topline">
492 <div class="container">
493 <div class="row ld-box">
494 <div class="col-md-6 ld-contactbox">
495 <div class="ld-contactbox-contacts">
496 <h4>${sContactDetails}</h4>
497 <!-- Cemex PL specific -->
498 <#if orders.phoneNumber?? && orders.phoneNumber.getData() != ""><p>Telefon: <a href="tel:${orders.phoneNumber.getData()}">${orders.phoneNumber.getData()}</a></p></#if>
499 <#if orders.email?? && orders.email.getData() != ""><p>E-mail: <a href="mailto:${orders.email.getData()}">${orders.email.getData()}</a></p></#if>
500 <#if SalesDepartment?? && SalesDepartment.getData() != ""><p>Sprzedaż: <a href="tel:${SalesDepartment.getData()}">${SalesDepartment.getData()}</a></p></#if>
501 <#if SalesRepresentative?? && SalesRepresentative.getData() != ""><p>Sprzedaż: <a href="tel:${SalesRepresentative.getData()}">${SalesRepresentative.getData()}</a></p></#if>
502 <div></div>
503 <!-- Cemex PL specific -->
504 <#assign basic_contact_has_data = false />
505 <#if BasicContact?? && BasicContact.getSiblings()?has_content>
506 <#list BasicContact.getSiblings() as cur_BasicContact>
507 <#if cur_BasicContact.getData() !="">
508 <#if cur_BasicContact.EmailContact?? && cur_BasicContact.EmailContact.getData() !="">
509 <#assign basic_contact_has_data = true />
510 </#if>
511 <#if cur_BasicContact.PhoneContact?? && cur_BasicContact.PhoneContact.getData() !="">
512 <#assign basic_contact_has_data = true />
513 </#if>
514 </#if>
515 </#list>
516 </#if>
517 <#if basic_contact_has_data>
518 <#list BasicContact.getSiblings() as cur_BasicContact>
519 <p>${cur_BasicContact.getData()}:
520 <#if cur_BasicContact.PhoneContact.getData() !="">
521 <a href="tel:${cur_BasicContact.PhoneContact.getData()}">${cur_BasicContact.PhoneContact.getData()}</a>
522 <#else>
523 <#if cur_BasicContact.EmailContact.getData() !="">
524 <a href="mailto:${cur_BasicContact.EmailContact.getData()}">${cur_BasicContact.EmailContact.getData()}</a>
525 </#if>
526 </#if>
527 </p>
528 </#list>
529 </#if>
530 </div>
531 <#if gLocationWeekdays?? || (openingHours?? && openingHours.getData() != "")>
532 <div class="ld-contactbox-hours">
533 <h4>${sOpeningH}</h4>
534 <#if gLocationWeekdays?? && openingHours.getData() = "">
535 <p>
536 <#list gLocationWeekdays as cur_gLocationWeekdays>
537 ${cur_gLocationWeekdays}<br>
538 </#list>
539 </p>
540 <#else>
541 <p>${openingHours.getData()}</p>
542 </#if>
543 </div>
544 </#if>
545 <div class="ld-contactbox-products">
546 <h4>${sProductListing}</h4>
547 <div class="ld-contactbox-products-list">
548 <#if categoryList?has_content>
549 <#list categoryList as category>
550 <#if category.vocabularyId = categoryProductListID>
551 <p>${category.getName()}
552 <#--if categoryList.getDescription() !="">
553 – ${categoryList.getDescription()}
554 </#if-->
555 </p>
556 </#if>
557 </#list>
558 </#if>
559 </div>
560 </div>
561
562
563 <!-- Cemex DE specific -->
564 <#assign quotePageLinkFriendlyUrl = getWebURL("/zapytaj-o-wycene")>
565 <#if QuotePageLink?? && QuotePageLink.getFriendlyUrl() !="">
566 <#assign quotePageLinkFriendlyUrl = QuotePageLink.getFriendlyUrl()>
567 </#if>
568 <div class="cta-secondary" data-component="cta-secondary">
569 <a data-senna-off="true" href="${quotePageLinkFriendlyUrl}" class="cta-secondary-link" target="_blank" rel="noopener noreferrer" title="${sGetQuote}">
570 <span class="button-copy">${sGetQuote}</span>
571 </a>
572 </div>
573 <!-- Cemex DE specific -->
574
575 </div>
576 <div class="col-md-6 ld-mapbox">
577 <#if geo>
578 <@liferay_map["map-display"]
579 geolocation=true
580 latitude=latitude
581 longitude=longitude
582 name="geoLoc_customgeolocation"
583 />
584 </#if>
585 </div>
586 </div>
587 </div>
588 </div>
589
590 <#if SummaryLabel?? && SummaryLabel.getData() !="">
591 <div class="ld-topline">
592 <div class="container">
593 <div class="row ld-box">
594 <div class="col-md-6 ld-aboutbox">
595 <div class="ld-aboutbox-about">
596 <h3>${SummaryLabel.getData()}</h3>
597 <p>${SummaryLabel.SummaryText.getData()}</p>
598 </div>
599 </div>
600 <div class="col-md-6 ld-gallerybox">
601
602 <div id="carousel-gallery" class="owl-carousel owl-theme">
603 <#if LocationImage.getSiblings()?has_content>
604 <#list LocationImage.getSiblings() as cur_LocationImage>
605 <#if cur_LocationImage.getData()?? && cur_LocationImage.getData() != "">
606 <div class="ld-gallerybox-imageholder ld-backimage" style="background-image: url('${cur_LocationImage.getData()}');">
607 </div>
608 </#if>
609 </#list>
610 </#if>
611 </div>
612 </div>
613 </div>
614 </div>
615 </div>
616 </#if>
617
618
619 <#assign local_contact_has_data = false />
620 <#if LocalContact?? && LocalContact.getSiblings()?has_content>
621 <#list LocalContact.getSiblings() as cur_LocalContact>
622 <#if cur_LocalContact.getData() !="">
623 <#if cur_LocalContact.WorkPositionLabel.getData() !="">
624 <#assign local_contact_has_data = true />
625 </#if>
626 <#if cur_LocalContact.email.getData() !="">
627 <#assign local_contact_has_data = true />
628 </#if>
629 <#if cur_LocalContact.PhoneNumber.getData() !="">
630 <#assign local_contact_has_data = true />
631 </#if>
632 </#if>
633 </#list>
634 </#if>
635 <#if local_contact_has_data>
636 <div class="ld-topline">
637 <div class="container">
638 <div class="row ld-box">
639 <div class="col-md-12 ld-peoplebox">
640 <h3>${sLocalContacts}</h3>
641 <div class="ld-peoplebox-list">
642 <#list LocalContact.getSiblings() as cur_LocalContact>
643 <div class="ld-peoplebox-list-contact">
644 <#if cur_LocalContact.getData() !="">
645 <span class="ld-peoplebox-list-contact-name">${cur_LocalContact.getData()}</span>
646 <#if cur_LocalContact.WorkPositionLabel.getData() !="">
647 <span class="ld-peoplebox-list-contact-text">${cur_LocalContact.WorkPositionLabel.getData()}</span>
648 </#if>
649 <!-- Cemex PL specific -->
650 <#if cur_LocalContact.LocalContactEmail.getData() !="">
651 <span class="ld-peoplebox-list-contact-text">E-mail: ${cur_LocalContact.LocalContactEmail.getData()}</span>
652 </#if>
653 <#if cur_LocalContact.LocalContactPhoneNumber.getData() !="">
654 <span class="ld-peoplebox-list-contact-text">phone: ${cur_LocalContact.LocalContactPhoneNumber.getData()}</span>
655 </#if>
656 <!-- Cemex PL specific -->
657 </#if>
658 </div>
659 </#list>
660 </div>
661 </div>
662 </div>
663 </div>
664 </div>
665 </#if>
666
667 <#assign pricelist_document_file_has_data = false />
668 <#if PricelistDocumentFile?? && PricelistDocumentFile.getSiblings()?has_content>
669 <#list PricelistDocumentFile.getSiblings() as cur_PricelistDocumentFile>
670 <#if cur_PricelistDocumentFile.getData() !="">
671 <#if cur_PricelistDocumentFile.FileDisplayName.getData() !="">
672 <#assign pricelist_document_file_has_data = true />
673 </#if>
674 </#if>
675 </#list>
676 </#if>
677 <#if pricelist_document_file_has_data>
678 <div class="ld-topline">
679 <div class="container">
680 <div class="row ld-box">
681 <div class="col-md-12 ld-docubox">
682 <h3>${sPriceList}</h3>
683 <div class="ld-docubox-list">
684 <#list PricelistDocumentFile.getSiblings() as cur_PricelistDocumentFile>
685 <div class="ld-docubox-list-file">
686 <i class="${cur_PricelistDocumentFile.FileTypeIcon.getData()} fa-2x inline-align-self-middle"> </i>
687 <a href="${cur_PricelistDocumentFile.getData()}" class="ld-docubox-list-doc ico-pdf" target="_blank">
688 ${cur_PricelistDocumentFile.FileDisplayName.getData()}
689 </a>
690 </div>
691 </#list>
692 </div>
693 </div>
694 </div>
695 </div>
696 </div>
697 </#if>
698 </div>
699</article>
700
701<#assign product_range_has_data = false />
702<#if ProductRange?? && ProductRange.getSiblings()?has_content>
703 <#list ProductRange.getSiblings() as cur_ProductRange>
704 <#if cur_ProductRange.getData() !="">
705 <#assign product_range_has_data = true />
706 </#if>
707 </#list>
708</#if>
709<#if product_range_has_data>
710 <div class="ld-topline">
711 <div class="container">
712 <div class="row ld-box">
713 <div class="col-md-12 ld-rangebox">
714 <h3>${sSpecialProducts}</h3>
715 <div id="carousel-products" class="ld-rangebox-list owl-carousel owl-theme">
716 <#list ProductRange.getSiblings() as cur_ProductRange>
717 <@printCard cur_ProductRange/>
718 </#list>
719 </div>
720 </div>
721 </div>
722 </div>
723 </div>
724</#if>
725
726<#-- macros & functions -->
727
728<#macro printCard card>
729
730 <#assign webContentData = jsonFactoryUtil.createJSONObject(card.getData())/>
731 <#if !webContentData.classPK??>
732 <#return>
733 </#if>
734 <#assign classPK = webContentData.classPK?number!"" />
735 <#assign journalArticle = journalArticleLocalService.getLatestArticle(classPK)!"none">
736 <#assign journalArticleId = journalArticle.getId() />
737 <#assign document=saxReaderUtil.read(journalArticle.getContent()) />
738
739 <#-- select localization in content to display -->
740 <#-- use actual language or default if is missed -->
741 <#assign availableLocale=document.getRootElement().attributeValue('available-locales') />
742 <#assign defaultLocale=document.getRootElement().attributeValue('default-locale') />
743 <#if availableLocale?contains(locale)>
744 <#assign displayLocale=locale>
745 <#else>
746 <#assign displayLocale=defaultLocale>
747 </#if>
748
749 <#assign cardHeading=document.valueOf("//dynamic-element[@name='ProductHeading']//dynamic-content[@language-id='${displayLocale}']") />
750 <#assign cardDescription=document.valueOf("//dynamic-element[@name='ProductDescription']//dynamic-content[@language-id='${displayLocale}']") />
751 <#assign cardImage=document.valueOf("//dynamic-element[@name='ProductImage']//dynamic-content[@language-id='${displayLocale}']") />
752 <#assign cardLogo=document.valueOf("//dynamic-element[@name='ProductLogo']//dynamic-content[@language-id='${displayLocale}']") />
753 <#--assign ImgMediumUrl = themeDisplay.getPortalURL() + "/o/adaptive-media/image/" + OptionalTourMainImage.fileEntryId + "/medium/" + OptionalTourMainImage.uuid /-->
754
755 <#assign cardUrl=document.valueOf("//dynamic-element[@name='LinkToPage']//dynamic-content[@language-id='${displayLocale}']") />
756 <#if cardUrl ="">
757 <#assign cardExtUrl=document.valueOf("//dynamic-element[@name='AlternateURLUseOnlyForLinksOutOfTheSite']//dynamic-content[@language-id='${displayLocale}']") />
758 </#if>
759 <#if cardUrl = "">
760 <#assign cardUrl = "#">
761 </#if>
762 <#if cardUrl != "#">
763 <#assign layoutId = cardUrl?keep_before("@")?number>
764 <#assign groupId = cardUrl?keep_after_last("@")?number>
765 <#assign pageLayout = layoutLocalService.getLayout(groupId, false, layoutId)>
766 <#assign cardUrl = pageLayout.getFriendlyURL() />
767 </#if>
768 <#-- get the right siteURL by system -->
769 <#assign siteURL = themeDisplay.getPortalURL() />
770 <#assign virtualHostname = layout.getLayoutSet().getVirtualHostname() />
771 <#if !virtualHostname?? || siteURL?index_of(virtualHostname) == -1 || virtualHostname?length == 0 >
772 <#assign siteURL = siteURL + layout.getGroup().getPathFriendlyURL(layout.isPrivateLayout(), themeDisplay)/>
773 <#assign siteURL = siteURL + layout.getGroup().getFriendlyURL()/>
774 </#if>
775 <#assign cardUrl = siteURL + cardUrl>
776
777 <a class="ld-rangebox-list-card" href="${cardUrl}">
778 <div class="ld-rangebox-list-card-image ld-backimage" style="background-image: url('${cardImage}');">
779 <#if cardLogo != "">
780 <img class="ld-rangebox-list-card-logo" src="${cardLogo}"/>
781 </#if>
782 </div>
783 <div class="ld-rangebox-list-card-text">
784 <h4 class="ld-rangebox-list-card-text-h">${cardHeading}</h4>
785 <p class="ld-rangebox-list-card-text-p">${cardDescription}</p>
786 </div>
787 </a>
788</#macro>
789
790<#function getWebURL pathURL>
791 <#-- get the right siteURL by system -->
792 <#assign siteURL = themeDisplay.getPortalURL() />
793 <#assign virtualHostname = layout.getLayoutSet().getVirtualHostname() />
794 <#if !virtualHostname?? || siteURL?index_of(virtualHostname) == -1 || virtualHostname?length == 0 >
795 <#assign siteURL = siteURL + layout.getGroup().getPathFriendlyURL(layout.isPrivateLayout(), themeDisplay)/>
796 <#assign siteURL = siteURL + layout.getGroup().getFriendlyURL()/>
797 </#if>
798 <#return siteURL + pathURL>
799</#function>
800<#-- write stars based on number -->
801<#function countStars stars>
802 <#assign return = "">
803 <#list 1..5 as x>
804 <#if (x > stars)>
805 <#assign return = return + '<i class="glyphicon glyphicon-star-empty"></i>'>
806 <#else>
807 <#assign return = return + '<i class="glyphicon glyphicon-star"></i>'>
808 </#if>
809 </#list>
810 <#return return>
811</#function>
812
813<#-- scripts -->
814
815<#-- owl carousel init gallery-->
816<script>
817 $(function() {
818 var time = 14; // time in seconds
819 var $bar, isPause, tick, percentTime;
820
821 //Init the carousel
822 var carouselGallery = {
823 slideSpeed: 900,
824 paginationSpeed: 500,
825 singleItem: true,
826 afterInit: progressBar,
827 afterMove: moved,
828 startDragging: pauseOnDragging,
829 // Responsive
830 responsive: true,
831 responsiveRefreshRate: 200,
832 responsiveBaseWidth: window
833 };
834
835 $("#carousel-gallery").owlCarousel(carouselGallery);
836 //Init progressBar
837 function progressBar(elem) {
838 // init handlers
839 //pause on mouseover
840 elem.on('mouseover', function() {
841 isPause = true;
842 });
843 elem.on('mouseout', function() {
844 isPause = false;
845 });
846 //build progress bar elements
847 buildProgressBar(elem);
848 //start counting
849 start(elem);
850 }
851
852 //create div#progressBar and div#bar then prepend
853 function buildProgressBar(elem) {
854 var $progressBar = $("<div>", {
855 id: "progressBar"
856 });
857 $bar = $("<div>", {
858 id: "bar"
859 });
860 $progressBar.append($bar).prependTo(elem);
861 }
862
863 function start(elem) {
864 //reset timer
865 percentTime = 0;
866 isPause = false;
867 //run interval every 0.01 second
868 tick = setInterval(function (){interval(elem)}, 10);
869 };
870
871 function interval(elem) {
872 if (isPause === false) {
873 percentTime += 1 / time;
874 $bar.css({
875 width: percentTime + "%"
876 });
877 //if percentTime is equal or greater than 100
878 if (percentTime >= 100) {
879 //slide to next item
880 elem.trigger('owl.next')
881 }
882 }
883 }
884
885 //pause while dragging
886 function pauseOnDragging() {
887 isPause = true;
888 }
889
890 //moved callback
891 function moved(elem) {
892 //clear interval
893 clearTimeout(tick);
894 //start again
895 start(elem);
896 }
897
898 });
899</script>
900
901
902
903<#-- owl carousel init products stripe-->
904<script>
905 $(function() {
906
907 //Init the carousel
908 var carouselProducts = {
909 slideSpeed: 900,
910 paginationSpeed: 500,
911 singleItem: false,
912 pagination: false,
913 navigation: true,
914 items: 4,
915 navigationText:["<i class='fas fa-chevron-left'></i>","<i class='fas fa-chevron-right'></i>"],
916 // Responsive
917 responsive: true,
918 responsiveRefreshRate: 200,
919 responsiveBaseWidth: window,
920 itemsDesktop: [1199, 3],
921 itemsDesktopSmall: [1020, 2],
922 itemsTablet: [1020, 2],
923 itemsMobile: [670, 1],
924 };
925
926 $("#carousel-products").owlCarousel(carouselProducts);
927
928 });
929</script>
930<script type="text/javascript">
931var prefixURL=(window.location.href).substr(0,(window.location.href).lastIndexOf("-/"));
932var ignoredURL=["-/wbt-tomaszow-lubelski","-/wbt-gorzow-wlkp"];
933var replaceURL=prefixURL+"znajdz-swoja-lokalizacje";
934
935ignoredURL.forEach((url) =>{
936 url=prefixURL+url;
937 if((window.location.href).split("?")[0] == url){
938 window.location.href = replaceURL;
939 }
940});
941</script>
942
943<#-- content group category -->
944<#assign finalCategories="" />
945<#attempt>
946 <#assign groupId=themeDisplay.getScopeGroupId() ?number>
947 <#assign assetVocabularyLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") />
948 <#assign categoryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
949 <#assign portletLocalService=serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService") />
950 <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
951 <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
952
953 <#assign currentURL = themeDisplay.getURLCurrent() />
954 <#assign urlPath = currentURL?split("?")[0] />
955 <#assign urlTitle = urlPath?split("/")[urlPath?split("/")?size - 1] />
956
957 <#assign parentVocabularyName="Content Groups (GA4)">
958 <#assign parentVocabulary= assetVocabularyLocalService.getGroupVocabulary(groupId,parentVocabularyName) />
959 <#assign childCategories=categoryLocalService.getVocabularyCategories(parentVocabulary.getVocabularyId(),-1,-1,null)>
960
961 <#assign articleCategories=[]>
962
963 <#assign journalArticle=journalArticleLocalService.getArticleByUrlTitle(groupId,urlTitle) >
964 <#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",journalArticle.getResourcePrimKey()) />
965 <#assign articleCategories=assetEntry.getCategories() />
966
967 <#list childCategories as category>
968 <#list articleCategories as articleCategory>
969 <#if category.getName() == articleCategory.getName()>
970 <#if finalCategories?has_content>
971 <#assign finalCategories = finalCategories + ", "+(articleCategory.getName()) />
972 <#else>
973 <#assign finalCategories=articleCategory.getName() >
974 </#if>
975
976 </#if>
977 </#list>
978 </#list>
979<#recover>
980 <script>console.error("Error accured while processing the content group business logic.")</script>
981</#attempt>
982
983
984
985<script>
986 var contentGroupElement = $("#content_group");
987
988 if(location.pathname.includes("/-/")) {
989 if(contentGroupElement.length !== 0) contentGroupElement.val("");
990 }
991
992 if("${finalCategories}" !== ""){
993 var elementValue = "${finalCategories}"
994 if(contentGroupElement.length === 0) $("body").append('<input type="hidden" id="content_group" name="content_group" value="'+elementValue+'">')
995 else contentGroupElement.val(elementValue)
996 }
997</script>
998<#-- End content group category -->