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