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 = "AIzaSyDVyErlQi9U0jRmlwXA0G60dy8IMrDvVK0"> 
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 GoogleLocationID?? && GoogleLocationID.getData() != ""> 
439    <#assign googleApiKey = gApiKey/> 
440    <#assign httpUtil = staticUtil["com.liferay.portal.kernel.util.HttpUtil"] /> 
441    <#assign response = httpUtil.URLtoString("https://maps.googleapis.com/maps/api/place/details/json?placeid=${GoogleLocationID.getData()}&fields=name,rating,user_ratings_total,url,opening_hours&language=${langPrefix}&key=${googleServerApiKey}") > 
442    <#-- https://maps.googleapis.com/maps/api/place/details/json?placeid=${GoogleLocationID.getData()}&fields=name,rating,user_ratings_total,url,opening_hours&language=${langPrefix}&key=${googleServerApiKey} --> 
443    <#assign resp = response?eval> 
444    <#if resp.result??> 
445        <#if resp.result.rating??> 
446            <#assign gLocationRate = resp.result.rating> 
447            <#assign gLocationUser_rates = resp.result.user_ratings_total> 
448            <#assign gLocationStars = countStars(gLocationRate)> 
449            <#assign gLocationUrl = resp.result.url> 
450        </#if> 
451        <#if resp.result.opening_hours??> 
452            <#assign gLocationWeekdays = resp.result.opening_hours.weekday_text> 
453        </#if> 
454    <#-- if bad respond --> 
455    <#elseif resp.status?? && resp.error_message??> 
456        <p>Google palace API: ${resp.status}<BR> 
457        Message: ${resp.error_message}</p> 
458    <#elseif resp.status??> 
459        <p>Google palace API: ${resp.status}</p> 
460    </#if> 
461</#if> 
462 
463 
464<article class="ld-location-detail"> 
465	<div class="row" style="margin-top:40px"> 
466        <div class="ld-wrapper col-xs-12"> 
467 
468        <div class=""> 
469            <div class="container"> 
470                <div class="row ld-box"> 
471                    <div class="col-xs-12 ld-topbox"> 
472                        <div class="ld-topbox-heading"> 
473                            <h1 class="ld-topbox-heading-h1">${locationName.getData()}</h1> 
474                            <#if gLocationRate gte 3> 
475                                <span class="ld-topbox-heading-stars">${gLocationRate} ${gLocationStars} | <a href="${gLocationUrl}" target="_blank">${gLocationUser_rates} ${sGoogleCustomerReviews}</a></span> 
476                            </#if> 
477                        </div> 
478                        <div class="ld-topbox-address"> 
479                            <p class="ld-topbox-address-address">${addressLine}</p> 
480                        </div> 
481                        <div class="ld-topbox-links"> 
482                            ${geo?then('<a target="_blank" href="https://google.com/maps/dir//${latitude},${longitude}">${sNavigate}</a>', '')} 
483                            <#if gLocationUrl != "#"> 
484                                <a href="${gLocationUrl}" target="_blank">${sOurProfile}</a> 
485                            </#if> 
486                        </div> 
487                    </div> 
488                </div> 
489            </div> 
490        </div> 
491 
492        <div class="ld-topline"> 
493            <div class="container"> 
494                <div class="row ld-box"> 
495                    <div class="col-md-6 ld-contactbox"> 
496                        <div class="ld-contactbox-contacts"> 
497                            <h4>${sContactDetails}</h4> 
498                            <!-- Cemex PL specific --> 
499                            <#if orders.phoneNumber?? && orders.phoneNumber.getData() != ""><p>Telefon: <a href="tel:${orders.phoneNumber.getData()}">${orders.phoneNumber.getData()}</a></p></#if> 
500                            <#if orders.email?? && orders.email.getData() != ""><p>E-mail: <a href="mailto:${orders.email.getData()}">${orders.email.getData()}</a></p></#if> 
501                            <#if SalesDepartment?? && SalesDepartment.getData() != ""><p>Sprzedaż: <a href="tel:${SalesDepartment.getData()}">${SalesDepartment.getData()}</a></p></#if> 
502                            <#if SalesRepresentative?? && SalesRepresentative.getData() != ""><p>Sprzedaż: <a href="tel:${SalesRepresentative.getData()}">${SalesRepresentative.getData()}</a></p></#if> 
503                            <div></div> 
504                            <!-- Cemex PL specific --> 
505                            <#assign basic_contact_has_data = false /> 
506                            <#if BasicContact?? && BasicContact.getSiblings()?has_content> 
507                              <#list BasicContact.getSiblings() as cur_BasicContact> 
508                                <#if cur_BasicContact.getData() !=""> 
509                                    <#if cur_BasicContact.EmailContact?? && cur_BasicContact.EmailContact.getData() !=""> 
510                                      <#assign basic_contact_has_data = true /> 
511                                    </#if> 
512                                    <#if cur_BasicContact.PhoneContact?? && cur_BasicContact.PhoneContact.getData() !=""> 
513                                      <#assign basic_contact_has_data = true /> 
514                                    </#if> 
515                                </#if> 
516                              </#list> 
517                            </#if> 
518                            <#if basic_contact_has_data> 
519                                <#list BasicContact.getSiblings() as cur_BasicContact> 
520                                <p>${cur_BasicContact.getData()}: 
521                                    <#if cur_BasicContact.PhoneContact.getData() !=""> 
522                                        <a href="tel:${cur_BasicContact.PhoneContact.getData()}">${cur_BasicContact.PhoneContact.getData()}</a> 
523                                    <#else> 
524                                      <#if cur_BasicContact.EmailContact.getData() !=""> 
525                                          <a href="mailto:${cur_BasicContact.EmailContact.getData()}">${cur_BasicContact.EmailContact.getData()}</a> 
526                                      </#if> 
527                                    </#if> 
528                                </p> 
529                                </#list> 
530                            </#if> 
531                        </div> 
532                        <#if gLocationWeekdays?? || (openingHours?? && openingHours.getData() != "")> 
533                          <div class="ld-contactbox-hours"> 
534                              <h4>${sOpeningH}</h4> 
535                              <#if gLocationWeekdays?? && openingHours.getData() = ""> 
536                              <p> 
537                              <#list gLocationWeekdays as cur_gLocationWeekdays> 
538                                  ${cur_gLocationWeekdays}<br> 
539                              </#list> 
540                              </p> 
541                              <#else> 
542                                  <p>${openingHours.getData()}</p> 
543                              </#if> 
544                          </div> 
545                        </#if> 
546                        <div class="ld-contactbox-products"> 
547                            <h4>${sProductListing}</h4> 
548                            <div class="ld-contactbox-products-list"> 
549                            <#if categoryList?has_content> 
550                                <#list categoryList as category> 
551                                    <#if category.vocabularyId = categoryProductListID> 
552                                        <p>${category.getName()} 
553                                            <#--if categoryList.getDescription() !=""> 
554                                                – ${categoryList.getDescription()} 
555                                            </#if--> 
556                                        </p> 
557                                    </#if> 
558                                </#list> 
559                            </#if> 
560                            </div> 
561                        </div> 
562 
563 
564                        <!-- Cemex DE specific --> 
565                        <#assign quotePageLinkFriendlyUrl = getWebURL("/zapytaj-o-wycene")> 
566                        <#if QuotePageLink?? && QuotePageLink.getFriendlyUrl() !=""> 
567                          <#assign quotePageLinkFriendlyUrl = QuotePageLink.getFriendlyUrl()> 
568                        </#if> 
569                        <div class="cta-secondary" data-component="cta-secondary"> 
570                            <a data-senna-off="true" href="${quotePageLinkFriendlyUrl}" class="cta-secondary-link" target="_blank" rel="noopener noreferrer" title="${sGetQuote}"> 
571                              <span class="button-copy">${sGetQuote}</span> 
572                            </a> 
573                        </div> 
574                        <!-- Cemex DE specific --> 
575 
576                    </div> 
577                    <div class="col-md-6 ld-mapbox"> 
578                        <#if geo> 
579                            <@liferay_map["map-display"] 
580                                geolocation=true 
581                                latitude=latitude 
582                                longitude=longitude 
583                                name="geoLoc_customgeolocation" 
584                            /> 
585                        </#if> 
586                    </div> 
587                </div> 
588            </div> 
589        </div> 
590 
591            <#if SummaryLabel?? && SummaryLabel.getData() !=""> 
592                <div class="ld-topline"> 
593                    <div class="container"> 
594                        <div class="row ld-box"> 
595                            <div class="col-md-6 ld-aboutbox"> 
596                                <div class="ld-aboutbox-about"> 
597                                    <h3>${SummaryLabel.getData()}</h3> 
598                                    <p>${SummaryLabel.SummaryText.getData()}</p> 
599                                </div> 
600                            </div> 
601                            <div class="col-md-6 ld-gallerybox"> 
602 
603                                <div id="carousel-gallery" class="owl-carousel owl-theme"> 
604                                    <#if LocationImage.getSiblings()?has_content> 
605                                        <#list LocationImage.getSiblings() as cur_LocationImage> 
606                                            <#if cur_LocationImage.getData()?? && cur_LocationImage.getData() != ""> 
607                                            <div class="ld-gallerybox-imageholder ld-backimage" style="background-image: url('${cur_LocationImage.getData()}');"> 
608                                            </div> 
609                                            </#if> 
610                                        </#list> 
611                                    </#if> 
612                                </div> 
613                            </div> 
614                        </div> 
615                    </div> 
616                </div> 
617            </#if> 
618 
619 
620        <#assign local_contact_has_data = false /> 
621        <#if LocalContact?? && LocalContact.getSiblings()?has_content> 
622          <#list LocalContact.getSiblings() as cur_LocalContact> 
623            <#if cur_LocalContact.getData() !=""> 
624               <#if cur_LocalContact.WorkPositionLabel.getData() !=""> 
625                  <#assign local_contact_has_data = true /> 
626                </#if> 
627                <#if cur_LocalContact.email.getData() !=""> 
628                  <#assign local_contact_has_data = true /> 
629                </#if> 
630                <#if cur_LocalContact.PhoneNumber.getData() !=""> 
631                  <#assign local_contact_has_data = true /> 
632                </#if> 
633            </#if> 
634          </#list> 
635        </#if> 
636        <#if local_contact_has_data> 
637          <div class="ld-topline"> 
638              <div class="container"> 
639                  <div class="row ld-box"> 
640                      <div class="col-md-12 ld-peoplebox"> 
641                          <h3>${sLocalContacts}</h3> 
642                          <div class="ld-peoplebox-list"> 
643                                  <#list LocalContact.getSiblings() as cur_LocalContact> 
644                                      <div class="ld-peoplebox-list-contact"> 
645                                          <#if cur_LocalContact.getData() !=""> 
646                                              <span class="ld-peoplebox-list-contact-name">${cur_LocalContact.getData()}</span> 
647                                              <#if cur_LocalContact.WorkPositionLabel.getData() !=""> 
648                                                  <span class="ld-peoplebox-list-contact-text">${cur_LocalContact.WorkPositionLabel.getData()}</span> 
649                                              </#if> 
650                                              <!-- Cemex PL specific --> 
651                                              <#if cur_LocalContact.LocalContactEmail.getData() !=""> 
652                                                  <span class="ld-peoplebox-list-contact-text">E-mail: ${cur_LocalContact.LocalContactEmail.getData()}</span> 
653                                              </#if> 
654                                              <#if cur_LocalContact.LocalContactPhoneNumber.getData() !=""> 
655                                                  <span class="ld-peoplebox-list-contact-text">phone: ${cur_LocalContact.LocalContactPhoneNumber.getData()}</span> 
656                                              </#if> 
657                                              <!-- Cemex PL specific --> 
658                                          </#if> 
659                                      </div> 
660                                  </#list> 
661                          </div> 
662                      </div> 
663                  </div> 
664              </div> 
665          </div> 
666        </#if> 
667 
668        <#assign pricelist_document_file_has_data = false /> 
669        <#if PricelistDocumentFile?? && PricelistDocumentFile.getSiblings()?has_content> 
670          <#list PricelistDocumentFile.getSiblings() as cur_PricelistDocumentFile> 
671            <#if cur_PricelistDocumentFile.getData() !=""> 
672               <#if cur_PricelistDocumentFile.FileDisplayName.getData() !=""> 
673                  <#assign pricelist_document_file_has_data = true /> 
674                </#if> 
675            </#if> 
676          </#list> 
677        </#if> 
678        <#if pricelist_document_file_has_data> 
679          <div class="ld-topline"> 
680              <div class="container"> 
681                  <div class="row ld-box"> 
682                      <div class="col-md-12 ld-docubox"> 
683                          <h3>${sPriceList}</h3> 
684                          <div class="ld-docubox-list"> 
685                                  <#list PricelistDocumentFile.getSiblings() as cur_PricelistDocumentFile> 
686                                      <div class="ld-docubox-list-file"> 
687                                          <i class="${cur_PricelistDocumentFile.FileTypeIcon.getData()} fa-2x inline-align-self-middle">&nbsp;</i> 
688                                          <a href="${cur_PricelistDocumentFile.getData()}" class="ld-docubox-list-doc ico-pdf" target="_blank"> 
689                                              ${cur_PricelistDocumentFile.FileDisplayName.getData()} 
690                                          </a> 
691                                      </div> 
692                                  </#list> 
693                          </div> 
694                      </div> 
695                  </div> 
696              </div> 
697          </div> 
698        </#if> 
699    </div> 
700</article> 
701 
702<#assign product_range_has_data = false /> 
703<#if ProductRange?? && ProductRange.getSiblings()?has_content> 
704  <#list ProductRange.getSiblings() as cur_ProductRange> 
705    <#if cur_ProductRange.getData() !=""> 
706      <#assign product_range_has_data = true /> 
707    </#if> 
708  </#list> 
709</#if> 
710<#if product_range_has_data> 
711  <div class="ld-topline"> 
712      <div class="container"> 
713        <div class="row ld-box"> 
714            <div class="col-md-12 ld-rangebox"> 
715                <h3>${sSpecialProducts}</h3> 
716                <div id="carousel-products" class="ld-rangebox-list owl-carousel owl-theme"> 
717                    <#list ProductRange.getSiblings() as cur_ProductRange> 
718                        <@printCard cur_ProductRange/> 
719                    </#list> 
720                </div> 
721            </div> 
722        </div> 
723      </div> 
724  </div> 
725</#if> 
726 
727<#-- macros & functions --> 
728 
729<#macro printCard card> 
730 
731        <#assign webContentData = jsonFactoryUtil.createJSONObject(card.getData())/> 
732        <#if !webContentData.classPK??> 
733            <#return> 
734        </#if> 
735        <#assign classPK = webContentData.classPK?number!"" /> 
736        <#assign journalArticle = journalArticleLocalService.getLatestArticle(classPK)!"none"> 
737        <#assign journalArticleId = journalArticle.getId() /> 
738        <#assign document=saxReaderUtil.read(journalArticle.getContent()) /> 
739 
740        <#-- select localization in content to display --> 
741        <#-- use actual language or default if is missed --> 
742        <#assign availableLocale=document.getRootElement().attributeValue('available-locales') /> 
743        <#assign defaultLocale=document.getRootElement().attributeValue('default-locale') /> 
744        <#if availableLocale?contains(locale)> 
745            <#assign displayLocale=locale> 
746        <#else> 
747            <#assign displayLocale=defaultLocale> 
748        </#if> 
749 
750        <#assign cardHeading=document.valueOf("//dynamic-element[@name='ProductHeading']//dynamic-content[@language-id='${displayLocale}']") /> 
751        <#assign cardDescription=document.valueOf("//dynamic-element[@name='ProductDescription']//dynamic-content[@language-id='${displayLocale}']") /> 
752        <#assign cardImage=document.valueOf("//dynamic-element[@name='ProductImage']//dynamic-content[@language-id='${displayLocale}']") /> 
753        <#assign cardLogo=document.valueOf("//dynamic-element[@name='ProductLogo']//dynamic-content[@language-id='${displayLocale}']") /> 
754        <#--assign ImgMediumUrl = themeDisplay.getPortalURL() + "/o/adaptive-media/image/" + OptionalTourMainImage.fileEntryId + "/medium/" + OptionalTourMainImage.uuid /--> 
755 
756        <#assign cardUrl=document.valueOf("//dynamic-element[@name='LinkToPage']//dynamic-content[@language-id='${displayLocale}']") /> 
757        <#if cardUrl =""> 
758            <#assign cardExtUrl=document.valueOf("//dynamic-element[@name='AlternateURLUseOnlyForLinksOutOfTheSite']//dynamic-content[@language-id='${displayLocale}']") /> 
759        </#if> 
760        <#if cardUrl = ""> 
761            <#assign cardUrl = "#"> 
762        </#if> 
763        <#if cardUrl != "#"> 
764            <#assign layoutId = cardUrl?keep_before("@")?number> 
765            <#assign groupId = cardUrl?keep_after_last("@")?number> 
766            <#assign pageLayout = layoutLocalService.getLayout(groupId, false, layoutId)> 
767            <#assign cardUrl = pageLayout.getFriendlyURL() /> 
768        </#if> 
769        <#-- get the right siteURL by system --> 
770            <#assign siteURL = themeDisplay.getPortalURL() /> 
771            <#assign virtualHostname = layout.getLayoutSet().getVirtualHostname() /> 
772            <#if !virtualHostname?? || siteURL?index_of(virtualHostname) == -1 || virtualHostname?length == 0 > 
773                <#assign siteURL = siteURL + layout.getGroup().getPathFriendlyURL(layout.isPrivateLayout(), themeDisplay)/> 
774                <#assign siteURL = siteURL + layout.getGroup().getFriendlyURL()/> 
775            </#if> 
776            <#assign cardUrl = siteURL + cardUrl> 
777 
778        <a class="ld-rangebox-list-card" href="${cardUrl}"> 
779            <div class="ld-rangebox-list-card-image ld-backimage" style="background-image: url('${cardImage}');"> 
780            <#if cardLogo != ""> 
781                <img class="ld-rangebox-list-card-logo" src="${cardLogo}"/> 
782            </#if> 
783            </div> 
784            <div class="ld-rangebox-list-card-text"> 
785                <h4 class="ld-rangebox-list-card-text-h">${cardHeading}</h4> 
786                <p class="ld-rangebox-list-card-text-p">${cardDescription}</p> 
787            </div> 
788        </a> 
789</#macro> 
790 
791<#function getWebURL pathURL> 
792  <#-- get the right siteURL by system --> 
793  <#assign siteURL = themeDisplay.getPortalURL() /> 
794  <#assign virtualHostname = layout.getLayoutSet().getVirtualHostname() /> 
795  <#if !virtualHostname?? || siteURL?index_of(virtualHostname) == -1 || virtualHostname?length == 0 > 
796      <#assign siteURL = siteURL + layout.getGroup().getPathFriendlyURL(layout.isPrivateLayout(), themeDisplay)/> 
797      <#assign siteURL = siteURL + layout.getGroup().getFriendlyURL()/> 
798  </#if> 
799  <#return siteURL + pathURL> 
800</#function> 
801<#-- write stars based on number --> 
802<#function countStars stars> 
803    <#assign return = ""> 
804    <#list 1..5 as x> 
805        <#if (x > stars)> 
806            <#assign return = return + '<i class="glyphicon glyphicon-star-empty"></i>'> 
807        <#else> 
808            <#assign return = return + '<i class="glyphicon glyphicon-star"></i>'> 
809        </#if> 
810    </#list> 
811    <#return return> 
812</#function> 
813 
814<#-- scripts --> 
815 
816<#-- owl carousel init gallery--> 
817<script> 
818  $(function() { 
819    var time = 14; // time in seconds 
820    var $bar, isPause, tick, percentTime; 
821 
822    //Init the carousel 
823    var carouselGallery = { 
824      slideSpeed: 900, 
825      paginationSpeed: 500, 
826      singleItem: true, 
827      afterInit: progressBar, 
828      afterMove: moved, 
829      startDragging: pauseOnDragging, 
830      // Responsive 
831      responsive: true, 
832      responsiveRefreshRate: 200, 
833      responsiveBaseWidth: window 
834    }; 
835 
836    $("#carousel-gallery").owlCarousel(carouselGallery); 
837    //Init progressBar 
838    function progressBar(elem) { 
839      // init handlers 
840      //pause on mouseover 
841      elem.on('mouseover', function() { 
842        isPause = true; 
843      }); 
844      elem.on('mouseout', function() { 
845        isPause = false; 
846      }); 
847      //build progress bar elements 
848      buildProgressBar(elem); 
849      //start counting 
850      start(elem); 
851
852 
853    //create div#progressBar and div#bar then prepend 
854    function buildProgressBar(elem) { 
855      var $progressBar = $("<div>", { 
856        id: "progressBar" 
857      }); 
858      $bar = $("<div>", { 
859        id: "bar" 
860      }); 
861      $progressBar.append($bar).prependTo(elem); 
862
863 
864    function start(elem) { 
865      //reset timer 
866      percentTime = 0; 
867      isPause = false; 
868      //run interval every 0.01 second 
869      tick = setInterval(function (){interval(elem)}, 10); 
870    }; 
871 
872    function interval(elem) { 
873      if (isPause === false) { 
874        percentTime += 1 / time; 
875        $bar.css({ 
876          width: percentTime + "%" 
877        }); 
878        //if percentTime is equal or greater than 100 
879        if (percentTime >= 100) { 
880          //slide to next item 
881          elem.trigger('owl.next') 
882
883
884
885 
886    //pause while dragging 
887    function pauseOnDragging() { 
888      isPause = true; 
889
890 
891    //moved callback 
892    function moved(elem) { 
893      //clear interval 
894      clearTimeout(tick); 
895      //start again 
896      start(elem); 
897
898 
899  }); 
900</script> 
901 
902 
903 
904<#-- owl carousel init products stripe--> 
905<script> 
906  $(function() { 
907 
908    //Init the carousel 
909    var carouselProducts = { 
910      slideSpeed: 900, 
911      paginationSpeed: 500, 
912      singleItem: false, 
913      pagination: false, 
914      navigation: true, 
915      items: 4, 
916      navigationText:["<i class='fas fa-chevron-left'></i>","<i class='fas fa-chevron-right'></i>"], 
917      // Responsive 
918      responsive: true, 
919      responsiveRefreshRate: 200, 
920      responsiveBaseWidth: window, 
921      itemsDesktop: [1199, 3], 
922      itemsDesktopSmall: [1020, 2], 
923      itemsTablet:  [1020, 2], 
924      itemsMobile:  [670, 1], 
925    }; 
926 
927    $("#carousel-products").owlCarousel(carouselProducts); 
928 
929  }); 
930</script>