La raccolta nel tuo comune
Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing: ==> themeDisplay.getURLCurrent()?split('?comune=')[1] [in template "20099#20135#850909" at line 364, column 27] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign QScomune = themeDisplay.getUR... [in template "20099#20135#850909" at line 364, column 9] ----
1<#noparse>
2<script>
3// Funzione standalone per override completo di HERAcquaModena come se fosse Hera
4function overrideHERAcquaModenaAsHera() {
5 const selectedComuneServices = sessionStorage.getItem(
6 "selectedComuneServices"
7 )
8 ? JSON.parse(sessionStorage.getItem("selectedComuneServices"))
9 : getServicesForSelectedComune();
10
11 // Controlla se ci sono servizi disponibili
12 if (!selectedComuneServices || !selectedComuneServices.comune ||
13 selectedComuneServices.tipologieCliente.length === 0) {
14 return;
15 }
16
17 // Determina il tipo di cliente (Casa o Business)
18 const type = location.pathname.split("/").includes("casa") ? "Casa" : "Business";
19 const tipologiaCliente = selectedComuneServices.tipologieCliente.find(
20 (el) => el.nomeTipologia === type
21 );
22
23 if (!tipologiaCliente) return;
24
25 // Cerca se c'è almeno un servizio con HERAcquaModena
26 const hasHERAcquaModena = tipologiaCliente.serviziSocieta.some(
27 (el) => el.societa === "HERAcquaModena"
28 );
29
30 console.log("DEBUG Override - Ha HERAcquaModena:", hasHERAcquaModena);
31 console.log("DEBUG Override - Tutti i servizi:", tipologiaCliente.serviziSocieta);
32
33 // Override solo se c'è almeno un servizio HERAcquaModena
34 if (hasHERAcquaModena) {
35 console.log("DEBUG Override - Applicando override completo per HERAcquaModena");
36
37 // Forza la visualizzazione di TUTTI i menu come se fosse Hera
38 $(".verifycomunemenu").each(function (index) {
39 const menu = $(this).attr("data-menu");
40
41 // Lista dei menu principali da mostrare
42 const menuDaMostrare = [
43 "Richieste multiservizio",
44 "Acqua e Fognatura",
45 "Gas",
46 "Energia Elettrica",
47 "Teleriscaldamento"
48 ];
49
50 if (menuDaMostrare.includes(menu)) {
51 console.log("DEBUG Override - Forzando visualizzazione menu:", menu);
52 $(this).show();
53 $(this).removeClass("d-none");
54
55 // Assicurati che anche i sottomenu siano visibili
56 $(this).find(".verifycomunemenu").each(function() {
57 $(this).show();
58 $(this).removeClass("d-none");
59 });
60
61 // Rimuovi eventuali style="display: none" inline
62 $(this).css('display', '');
63 $(this).find(".verifycomunemenu").css('display', '');
64 }
65
66 // Gestione speciale per link senza data-menu ma con classi verifycomunemenu
67 if (!menu && $(this).hasClass("verifycomunemenu")) {
68 // Controlla se il parent ha un menu che dovrebbe essere visibile
69 const parentMenu = $(this).closest('[data-menu]').attr("data-menu");
70 if (menuDaMostrare.includes(parentMenu)) {
71 console.log("DEBUG Override - Forzando visualizzazione sottomenu di:", parentMenu);
72 $(this).show();
73 $(this).removeClass("d-none");
74 $(this).css('display', '');
75 }
76 }
77 });
78
79 // Override anche per elementi con data-menu="Ambiente" se presente
80 $('[data-menu="Ambiente"]').each(function() {
81 console.log("DEBUG Override - Forzando visualizzazione menu Ambiente");
82 $(this).show();
83 $(this).removeClass("d-none");
84 $(this).css('display', '');
85 });
86 }
87
88}
89
90// Auto-esecuzione al caricamento della pagina
91$(window).on('load', function() {
92 overrideHERAcquaModenaAsHera();
93});
94
95// Esegui anche dopo il cambio comune
96if (typeof initCallback !== 'undefined') {
97 const originalInitCallback = initCallback;
98 initCallback = function() {
99 originalInitCallback();
100 overrideHERAcquaModenaAsHera();
101 };
102}
103
104// Listener per cambio sessionStorage
105$(window).on('storage', function(e) {
106 if (e.originalEvent.key === 'selectedComuneServices') {
107 overrideHERAcquaModenaAsHera();
108 }
109});
110
111// Override delle funzioni esistenti che gestiscono i menu
112if (typeof showhidepanels !== 'undefined') {
113 const originalShowhidepanels = showhidepanels;
114 showhidepanels = function() {
115 const result = originalShowhidepanels.apply(this, arguments);
116 overrideHERAcquaModenaAsHera();
117 return result;
118 };
119}
120
121// Override anche per la funzione che gestisce i comuni
122$(document).on('click', '.inputcomune', function() {
123 setTimeout(function() {
124 overrideHERAcquaModenaAsHera();
125 }, 600);
126});
127
128// Override per eventi di selezione comune
129$(document).on('DOMSubtreeModified', function() {
130 const selectedComuneServices = sessionStorage.getItem("selectedComuneServices");
131 if (selectedComuneServices) {
132 const services = JSON.parse(selectedComuneServices);
133 if (services.comune && services.tipologieCliente) {
134 overrideHERAcquaModenaAsHera();
135 }
136 }
137});
138
139</script>
140</#noparse>
141
142
143
144<#assign colorbackground="" />
145<#if ColoreSezione.getData() !="" && ColoreSfondo.getData()!="#" && ColoreSfondo.getData()!="#00000">
146 <#assign colorbackground=ColoreSfondo.getData() />
147<#elseif ColoreSezione.getData() !="">
148 <#assign colorbackground=ColoreSezione.getData() />
149
150<#else>
151 <#assign colorbackground=ColoreSfondo.getData() />
152</#if>
153
154<#assign prefUrlCondividi=themeDisplay.getPortalURL() urlcustom=themeDisplay.getURLCurrent()?keep_before("?")
155currentURL=themeDisplay.getURLCurrent() assistenzaUrl="/assistenza" ambienteUrl="/ambiente" mobileMenuClass="" />
156
157<script>
158
159 var timeElapsed = 0;
160 var interval = setInterval(function() {
161 timeElapsed += 100;
162 $('li.text-decoration-underline').each(function() {
163 // Cerca il tag <a> con il testo "Comunicati stampa" all'interno del <li>
164 var link = $(this).find('a').filter(function() {
165 return $(this).text().trim() === 'Comunicati stampa';
166 });
167
168 // Se il tag <a> con il testo "Comunicati stampa" � trovato, rimuovi l'after
169 if (link.length > 0) {
170 $(this).css('content', 'none'); // Rimuovi l'after
171 }
172 });
173
174 var comunicatiLink = $('a').filter(function() {
175 return $(this).text().trim() === 'Comunicati stampa';
176 });
177
178 if (comunicatiLink.length > 0) {
179 comunicatiLink.closest('.col-10')
180 .siblings()
181 .remove();
182
183 clearInterval(interval);
184 }
185
186 if (timeElapsed >= 5000) {
187 clearInterval(interval);
188 }
189 }, 100);
190</script>
191
192<style>
193
194 .modal.show .modal-dialog {
195 width: 60%;
196 }
197 .header-breadcrumb li.text-decoration-underline::after{
198 content: '>';
199 display: inline-block;
200 margin-right: 7px;
201 }
202 .testatabreadcrumb .offerta-modal {
203 z-index: 100;
204 display: block;
205 position: absolute;
206 height: max-content;
207 width: max-content;
208 right: 85px;
209 top: 80px;
210 box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
211 margin: 3px;
212 }
213 @media (max-width: 991px) {
214 .testatabreadcrumb .offerta-modal {
215 right: 30px;
216 top: 70px;
217 }
218 }
219 .testatabreadcrumb .offerta-modal-content {
220 background-color: #fefefe;
221 margin: auto;
222 padding: 20px;
223 border-radius: 0.75rem !important;
224 }
225 .testatabreadcrumb .close_offerta {
226 color: #aaa;
227 float: right;
228 font-size: 28px;
229 font-weight: bold;
230 }
231 .testatabreadcrumb .close_offerta:hover, .testatabreadcrumb .close_offerta:focus {
232 color: #000;
233 text-decoration: none;
234 cursor: pointer;
235 }
236 .testatabreadcrumb .close-icon {
237 position: absolute !important;
238 right: 20px;
239 top: 2px;
240 }
241 .testatabreadcrumb .social__wrapper {
242 list-style-type: none;
243 padding-left: 0;
244 }
245 .testatabreadcrumb .social__icon {
246 border: none;
247 border-radius: 50%;
248 padding: 8px;
249 width: 40px;
250 height: 40px;
251 cursor: pointer;
252 }
253 .testatabreadcrumb .social__title {
254 letter-spacing: 0.5px;
255 font-weight: 600;
256 }
257 .testatabreadcrumb .social__iconFacebook {
258 background-color: #3b5998;
259 color: #fff;
260 }
261 .testatabreadcrumb .social__iconLinkedIn {
262 background-color: #0e76a8;
263 color: #fff;
264 }
265 .testatabreadcrumb .social__iconTwitter {
266 background-color: black;
267 color: #fff;
268 }
269 .testatabreadcrumb .social__iconMail {
270 background-color: #018982;
271 color: #fff;
272 }
273 .testatabreadcrumb .social__iconCopyLink {
274 background-color: #018982;
275 color: #fff;
276 }
277 .testatabreadcrumb .social__iconWhatsapp {
278 background-color: #25d366;
279 color: #fff;
280 }
281 .testatabreadcrumb .fa-whatsapp:before {
282 content: "\f232";
283 }
284 .testatabreadcrumb .social__titleWrapper {
285 border: 0;
286 padding: 0;
287 background-color: transparent;
288 color: #018982;
289 cursor: pointer;
290 min-width: 81px;
291 }
292
293 .sharetext{
294color: white;
295margin-top: 14px;
296}
297</style>
298
299<#assign completeUrl=prefUrlCondividi + urlcustom />
300
301<script>
302
303 $(document).ready(function () {
304 $('#select-menu').click(function () {
305 if ($('#root-arrow').hasClass('icon-chevron-down')) {
306 $('#root-arrow').removeClass('icon-chevron-down');
307 $('#root-arrow').addClass('icon-chevron-up');
308 $('#select-menu .select-menu-container').addClass('open');
309 }
310 else {
311 $('#root-arrow').removeClass('icon-chevron-up');
312 $('#root-arrow').addClass('icon-chevron-down');
313 setTimeout(function () {
314 $('#select-menu .select-menu-container').removeClass('open');
315 }, 800);
316 }
317 });
318 });
319</script>
320<#assign nomepagina=themeDisplay.getLayout().getName(locale) />
321<#assign title=.vars['reserved-article-title'].data vocabularyId=0
322journalArticleServiceUtil=objectUtil("com.liferay.journal.service.JournalArticleServiceUtil")
323assetVocabularyServiceUtil=objectUtil("com.liferay.asset.kernel.service.AssetVocabularyLocalServiceUtil")
324vocabulariesList=assetVocabularyServiceUtil.getGroupVocabularies(themeDisplay.getScopeGroupId())
325journalArticle=journalArticleServiceUtil.getArticle(getterUtil.getLong(scopeGroupId),
326.vars['reserved-article-id'].data)
327assetCategoryServiceUtil=objectUtil("com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil")
328journalArticleCategories=assetCategoryServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",
329journalArticle.getResourcePrimKey()) nomecomune=languageUtil.get(locale, "comune-generico" )
330comuniVar=languageUtil.get(locale, "COMUNI" ) yesVar=languageUtil.get(locale, "yesVar" )
331stringacondividi=languageUtil.get(locale, "stringacondividi" )
332stringachiusura=getterUtil.getString(themeDisplay.getThemeSetting("stringa-chiusura"))
333gruppoUrl=languageUtil.get(locale, "gruppo-internal-url" )
334gruppoEngUrl=languageUtil.get(locale, "gruppo-internal-eng-url" ) chiSiamoName=languageUtil.get(locale, "chi-siamo"
335) chiSiamoEngName=languageUtil.get(locale, "chi-siamo-eng" )
336offerteServiziUrl=languageUtil.get(locale, "offerte-internal-url" )
337assistenzaUrl=languageUtil.get(locale, "assistenza-internal-url" )
338assistenzaAmbienteUrl=languageUtil.get(locale, "ambiente-internal-url" ) fornitoriUrl="/fornitori"
339dlgblockVar="d-lg-block" trueVar="true" prefUrlCondividi=themeDisplay.getPortalURL()
340urlcustom=themeDisplay.getURLCurrent()?keep_before("?") />
341<#assign completeUrl=prefUrlCondividi + urlcustom />
342<#list vocabulariesList as vocabulary>
343 <#assign vocabularyName=vocabulary.getName() />
344 <#if vocabularyName==comuniVar>
345 <#assign vocabularyId=vocabulary.getVocabularyId() />
346 </#if>
347</#list>
348<#assign listcomuni=[] />
349<#list journalArticleCategories as category>
350 <#if category.vocabularyId==vocabularyId>
351 <#assign listcomuni=listcomuni + [category.name] />
352 </#if>
353</#list>
354<#list listcomuni as comune>
355 <#if (listcomuni?size gt 0)>
356 <#assign nomecomune=nomecomune +"@" + comune />
357 <#else>
358 <#assign nomecomune=comune />
359 </#if>
360</#list>
361<#assign selectedComune='' />
362<#if urlcustom?contains('/tariffa-puntuale') || urlcustom?contains('/ambiente/tari') || urlcustom?contains('/tributi-e-tariffe/tari') || urlcustom?contains('/tcp') || urlcustom?contains('/la-raccolta-nel-tuo-comune') || urlcustom?contains('/pulizia-strade')>
363 <#if themeDisplay.getURLCurrent()?matches('.*comune=.*')>
364 <#assign QScomune=themeDisplay.getURLCurrent()?split('?comune=')[1]?split('&')[0]/>
365 <#assign lista = assetCategoryServiceUtil.getCategories("com.liferay.portal.kernel.model.layout", themeDisplay.getLayout().getPrimaryKey())>
366 <#list lista as comune>
367 <#if heraContributorLocalService.normalize(comune.getName()) == heraContributorLocalService.normalize(QScomune)?upper_case>
368 <#assign selectedComune=comune.getName()?capitalize />
369 <#break>
370 </#if>
371 </#list>
372 <#elseif request.session.getAttribute('selectedComune')??>
373 <#assign selectedComune=request.session.getAttribute('selectedComune')?capitalize />
374 </#if>
375</#if>
376
377<#assign verifycomunemenu_class='' />
378<#if urlcustom?contains('/assistenza') || urlcustom?contains('/offerte-e-servizi/casa/ambiente')>
379 <#assign verifycomunemenu_class='verifycomunemenu' />
380</#if>
381
382
383
384<input type="hidden" name="nomecomune" value="${nomecomune}" />
385<div class="testatabreadcrumb bannershape position-relative" style="background-color:${colorbackground}">
386 <div class="container">
387 <div class="row">
388 <div class="col-lg-4 col-md-12">
389 <#assign actualUrl=themeDisplay.getLayout().getName(locale) breadcrumbName="" breadcrumbURLS=""
390 breadcrumb="" pageName="" pageNameUrl="" fulllayout="" breadcrumbNames=[] breadcrumbURLS=[]
391 idnumber=0 viewinmenu=true brothersviewmenu=[] currentindex=0 breadcrumbURL="" />
392 <#list themeDisplay.getLayout().getAncestors() as ancestor>
393 <#if (ancestor?index==0)>
394 <#assign
395 fulllayout=ancestor
396 publiclayout=fulllayout.isPublicLayout()
397 breadcrumbName=ancestor.getName(locale) breadcrumbURL=ancestor.getFriendlyURL()
398 breadcrumbNames +=[ancestor.getName(locale)]
399 />
400 </#if>
401 </#list>
402 <#assign breadcrumbNames=breadcrumbNames?reverse />
403 <#assign ancestorIndex=1 />
404 <#if breadcrumbURL?contains(gruppoUrl)>
405 <#if breadcrumbURL?contains(fornitoriUrl)>
406 <#assign ancestorIndex=3 />
407 <#else>
408 <#assign ancestorIndex=2 />
409 </#if>
410 <#elseif breadcrumbURL?contains(offerteServiziUrl)>
411 <#assign ancestorIndex=3 />
412 <#elseif breadcrumbURL?contains(assistenzaUrl)>
413 <#if breadcrumbURL?contains(assistenzaAmbienteUrl)>
414 <#assign ancestorIndex=3 />
415 <#else>
416 <#assign ancestorIndex=2 />
417 </#if>
418 <#elseif breadcrumbURL?contains("investorNews")>
419 <#if breadcrumbURL?contains("edizioni")>
420 <#assign ancestorIndex=4 />
421 <#else>
422 <#assign ancestorIndex=3 />
423 </#if>
424 </#if>
425 <#list themeDisplay.getLayout().getAncestors()?reverse as ancestor>
426 <#if (ancestor?index==ancestorIndex)>
427 <#assign fulllayout=ancestor />
428 <#break />
429 </#if>
430 </#list>
431 <#if fulllayout !="">
432 <#assign pageName=fulllayout.getName(locale) pageNameUrl=fulllayout.getFriendlyURL() />
433 </#if>
434 <#if TitoloBanner?? && (TitoloBanner.getData()?lower_case?trim==chiSiamoName?lower_case?trim ||
435 TitoloBanner.getData()?lower_case?trim==chiSiamoEngName?lower_case?trim)>
436 <#list fulllayout.getChildren() as ancestor>
437 <#if ancestor.getName(locale)?lower_case?trim==chiSiamoName?lower_case?trim ||
438 ancestor.getName(locale)?lower_case?trim==chiSiamoEngName?lower_case?trim>
439 <#assign fulllayout=ancestor pageName=fulllayout.getName(locale)
440 pageNameUrl=fulllayout.getFriendlyURL() />
441 <#break />
442 </#if>
443 </#list>
444 </#if>
445 <#if MostraMenuLaterale.getData()==dlgblockVar>
446 <#list fulllayout.getChildren() as children>
447 <#assign brotherschildnames=[] />
448 <#assign brotherschildurls=[] />
449 <#assign brothersviewmenu +=[children.getExpandoBridge().getAttribute("VisualizzabileInMenu")
450 ] />
451 <#list children.getChildren() as brotherschild>
452 <#assign brotherschildnames +=[brotherschild.getName(locale)] brotherschildurls
453 +=[brotherschild.getFriendlyURL()] />
454 </#list>
455 <#assign breadcrumbURL=layout.getGroup().getDisplayURL(themeDisplay, false) +
456 children.getName(locale) />
457 <#assign
458 assetVocabularyServiceUtil=objectUtil("com.liferay.asset.kernel.service.AssetVocabularyLocalServiceUtil")
459 pageVocabularies=assetVocabularyServiceUtil.getGroupVocabularies(themeDisplay.getScopeGroupId(), "COMUNI"
460 , -1, -1, null)
461 assetCategoryServiceUtil=objectUtil("com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil")
462 pageCategories=assetCategoryServiceUtil.getCategories("com.liferay.portal.kernel.model.layout",
463 children.getPrimaryKey()) cssPageCategories="" pageVocabularyId=0 />
464 <#if pageVocabularies?size gt 0>
465 <#list pageVocabularies as pageVocabulary>
466 <#assign pageVocabularyId=pageVocabulary.getVocabularyId() />
467 </#list>
468 <#if pageCategories?size gt 0>
469 <#list pageCategories as pageCategory>
470 <#if pageCategory.getVocabularyId()==pageVocabularyId>
471 <#assign cssPageCategories +="@" + pageCategory.getName() />
472 </#if>
473 </#list>
474 </#if>
475 </#if>
476 <#if brotherschildnames?size !=0>
477 <#if brothersviewmenu[currentindex]?c==trueVar>
478 <#assign
479 isArrowDown=""
480 isItemOnCurrentParentText = ""
481 singleItemName = children.getName(locale)
482 currentPageName = themeDisplay.getLayout().getName(locale)
483 shouldFilterOnChildItem = "true"
484 menuStyle=""
485 />
486 <#if currentPageName?lower_case==singleItemName?lower_case>
487 <#assign
488 menuStyle="font-weight: 600"
489 iconChevron="icon-chevron-down"
490 collapse="collapse show"
491 shouldFilterOnChildItem = "false"
492 />
493 </#if>
494 <#if shouldFilterOnChildItem = "true">
495 <#list breadcrumbNames as breadcrumbName>
496 <#if breadcrumbName == singleItemName>
497 <#assign
498 isItemOnCurrentParentText = "true"
499 />
500 </#if>
501 </#list>
502
503 <#if isItemOnCurrentParentText == "true">
504 <#list children.getChildren() as brotherschild>
505 <#if actualUrl==brotherschild.getName(locale) || themeDisplay.getLayout().getName(locale) == brotherschild.getName(locale)>
506 <#assign iconChevron="icon-chevron-down" collapse="collapse show" isArrowDown="true"/>
507 </#if>
508 </#list>
509 </#if>
510
511 <#if isArrowDown != "true">
512 <#assign menuStyle="" iconChevron="icon-chevron-right" collapse="collapse" />
513 </#if>
514 </#if>
515 <#assign breadcrumbURLLink="<li><div class=\" dropdown px-2 py-2 ${verifycomunemenu_class}
516 ${cssPageCategories}\" data-menu=\"${children.getName(locale)}\">
517 <div class='row'>
518 <div class='col-10'><a class='d-inline pointer greyish-brown normal2'
519 style='${menuStyle}' href='" + children.getFriendlyURL() + "'>"
520 breadcrumbURLLink += children.getName(locale) + "</a></div>"
521 />
522 <#-- breadcrumbURLLink +="<div class='col-1'><div id='submenu_" + idnumber
523 + "' class=' pointer ${iconChevron} dropdown-toggle d-inline greyish-brown normal2' role='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'></div>"
524 breadcrumbURLLink
525 +="<div style='top:-30px!important;' class='ml-4 dropdown-menu white' labelledby='submenu_"
526 + idnumber + "'>" idnumber=idnumber+1 -->
527 <#assign idArrowSubmenu=children.getName(locale)?replace(" ", "
528 -")?replace(",", "" )?replace(":", "" )?lower_case?trim
529 idnumber=idnumber+1 show_submenu=false />
530 <#list children.getChildren() as brotherschild>
531 <#if
532 brotherschild.getExpandoBridge().getAttribute("VisualizzabileInMenu")>
533 <#if
534 brotherschild.getExpandoBridge().getAttribute("VisualizzabileInMenu")?c==trueVar>
535 <#assign show_submenu=true />
536 </#if>
537 </#if>
538 <#if show_submenu>
539 <#break />
540 </#if>
541 </#list>
542 <#if show_submenu>
543 <#assign breadcrumbURLLink
544 +="<div class='col-1' ><div class='arrow-submenu pointer ${iconChevron} dropdown-toggle d-inline greyish-brown normal2' role='button' tabindex='0' aria-label='Espandi ${children.getName(locale)}' data-toggle='collapse' id='arrow-submenu-${idArrowSubmenu}' data-target='#submenu-${idnumber}' aria-haspopup='true' aria-expanded='false'></div></div>"
545 breadcrumbURLLink
546 +="<div class='col-11 pl-4 ${collapse}' id='submenu-" + idnumber
547 + "'><ul class='list-unstyled' style='list-style: none; padding: 0;'>" />
548 <#list children.getChildren() as brotherschild>
549 <#if
550 brotherschild.getExpandoBridge().getAttribute("VisualizzabileInMenu")>
551 <#assign
552 assetVocabularyServiceUtil=objectUtil("com.liferay.asset.kernel.service.AssetVocabularyLocalServiceUtil")
553 pageVocabularies=assetVocabularyServiceUtil.getGroupVocabularies(themeDisplay.getScopeGroupId(), "COMUNI"
554 , -1, -1, null)
555 assetCategoryServiceUtil=objectUtil("com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil")
556 pageCategories=assetCategoryServiceUtil.getCategories("com.liferay.portal.kernel.model.layout",
557 brotherschild.getPrimaryKey()) cssPageCategories=""
558 pageVocabularyId=0 />
559 <#if pageVocabularies?size gt 0>
560 <#list pageVocabularies as pageVocabulary>
561 <#assign
562 pageVocabularyId=pageVocabulary.getVocabularyId() />
563 </#list>
564 <#if pageCategories?size gt 0>
565 <#list pageCategories as pageCategory>
566 <#if
567 pageCategory.getVocabularyId()==pageVocabularyId>
568 <#assign cssPageCategories +="@" +
569 pageCategory.getName() />
570 </#if>
571 </#list>
572 </#if>
573 </#if>
574 <#assign isItemOnCurrentParentText = "false" />
575 <#list breadcrumbNames as breadcrumbName>
576 <#if breadcrumbName == singleItemName>
577 <#assign
578 isItemOnCurrentParentText = "true"
579 />
580 </#if>
581 </#list>
582 <#assign menuStyle="" />
583 <#if actualUrl==brotherschild.getName(locale) && isItemOnCurrentParentText == "true">
584 <#assign menuStyle="font-weight: 600" />
585 </#if>
586 <#assign brotherschildname=brotherschild.getName(locale)
587 brotherschildurl=brotherschild.getFriendlyURL()
588 breadcrumbURLLink +="<li><a class=\" d-block pointer
589 greyish-brown normal2 px-1 py-1 ${verifycomunemenu_class}
590 ${cssPageCategories}\" data-menu=\"${children.getName(locale)}\" style='${menuStyle}'
591 href='" + brotherschildurl + "'>" +
592 brotherschildname + "</a></li>"
593 />
594 </#if>
595 </#list>
596 <#else>
597 <#assign breadcrumbURLLink
598 +="<div class='col-11 pl-4 ${collapse}' id='submenu-" + idnumber
599 + "'><ul class='list-unstyled' style='list-style: none; padding: 0;'>" />
600 </#if>
601 <#assign breadcrumbURLLink +="</ol></div></div></div></li>" />
602 <#assign breadcrumb=breadcrumb + breadcrumbURLLink />
603 </#if>
604 <#else>
605 <#if brothersviewmenu[currentindex]?c==trueVar>
606 <#assign menuStyle="" />
607 <#if actualUrl==children.getName(locale)>
608 <#assign menuStyle="font-weight: 600" />
609 </#if>
610 <#assign breadcrumbURLLink="<li><a class=\" d-block col-10 greyish-brown
611 normal2 px-2 py-2 verifycomunemenu ${cssPageCategories}\"
612 data-menu=\"${children.getName(locale)}\" style='${menuStyle}' href='" + children.getFriendlyURL() + "'>" +
613 children.getName(locale) + "</a></li>"
614 breadcrumb = breadcrumb + breadcrumbURLLink
615 />
616 </#if>
617 </#if>
618 <#assign currentindex=currentindex+1 />
619 </#list>
620 </#if>
621 <#assign breadcrumbBuckup=breadcrumb />
622 <div class="container sidemenucontent ${MostraMenuLaterale.getData()}">
623 <div class="tile" id="menu-laterale">
624 <div class="tile-content">
625 <div class="tilewrapper">
626 <nav aria-label="Navigazione ${pageName}">
627 <ul class='list-unstyled' style="list-style: none; padding: 0;">
628 <li>
629 <a class="${ColoreTesto.getData()}" href="${pageNameUrl}">
630 <p class="bolder greyish-brown normal2 px-2 text-uppercase">${pageName}</p>
631 </a>
632 <hr class="my-3 mx-2">
633 </li>
634
635 ${breadcrumb}
636 </ul>
637 </nav>
638 </div>
639 </div>
640 </div>
641 </div>
642 </div>
643 <div class="col-lg-7 col-md-10 col-sm-10 col-xs-8">
644 <#assign actualUrl="<li class='actualurlbread ${ColoreTesto.getData()}'>" +
645 themeDisplay.getLayout().getName(locale) + "</li>" breadcrumbNames=[] breadcrumbURLS=[]
646 rightAngleBracket="<span class='right-angle-bracket ${ColoreTesto.getData()}'> > </span>"
647 breadcrumb="" />
648 <#list themeDisplay.getLayout().getAncestors() as ancestor>
649 <#assign breadcrumbNames +=[ancestor.getName(locale)] breadcrumbURLS
650 +=[ancestor.getFriendlyURL()] />
651 </#list>
652 <#assign breadcrumbNames=breadcrumbNames?reverse breadcrumbURLS=breadcrumbURLS?reverse />
653 <#list breadcrumbNames as breadcrumbName>
654 <#if breadcrumbName !="Super Homepage">
655 <#assign menuStyle="" />
656 <#if actualUrl==breadcrumbName>
657 <#assign menuStyle="font-weight: 600" />
658 </#if>
659 <#assign breadcrumbIndex=breadcrumbName?index breadcrumbURL=breadcrumbURLS[breadcrumbIndex]
660 breadcrumbURL=layout.getGroup().getDisplayURL(themeDisplay, false) + breadcrumbURL
661 breadcrumbURLLink="<li class='text-decoration-underline'><a class='${ColoreTesto.getData()} pr-2' style='${menuStyle}' href='" + breadcrumbURL
662 + "'>" + breadcrumbName + "</a></li>" breadcrumb=breadcrumb + breadcrumbURLLink/>
663 <#if (ancestorIndex + 1)==breadcrumbName?index>
664 <#assign idSubmenuArrow=breadcrumbName?string?replace(" ", " -")?replace(",", "" )?replace(":", ""
665 )?lower_case?trim />
666 <script>
667 var id = String("${idSubmenuArrow}");
668 var arrowId = "#arrow-submenu-" + id;
669 var submenu="#submenu-" + id;
670 if($(submenu) && $(submenu).length > 0) {
671 $(submenu).click(() => {
672 if ($(submenu).hasClass('icon-chevron-right')) {
673 $(submenu).removeClass('icon-chevron-right');
674 $(submenu).addClass('icon-chevron-down');
675 } else {
676 $(submenu).removeClass('icon-chevron-down');
677 $(submenu).addClass('icon-chevron-right');
678 }
679 });
680 }
681
682 </script>
683 </#if>
684 </#if>
685 </#list>
686 <#assign breadcrumb=breadcrumb + actualUrl />
687 <div class="pb-4">
688 <h1 id="pagename" class="${ColoreTesto.getData()} title-bigger bold pt-4 pt-md-2 pt-lg-5 mb-2">
689 ${TitoloBanner.getData()}
690 <#if selectedComune??>
691 ${selectedComune}
692 </#if>
693 </h1>
694 <#if TestoAggiuntivo??>
695 <#if TestoAggiuntivo.getData() !="">
696 <p class="${ColoreTesto.getData()} normal bold">${TestoAggiuntivo.getData()}</p>
697 </#if>
698 </#if>
699 <#if (MostraBreadcrumb.getData()==yesVar)>
700 <nav class="header-breadcrumb ${ColoreTesto.getData()}" aria-label="Percorso di navigazione"><ol class="d-flex flex-wrap" style='list-style: none; padding: 0;'>${breadcrumb}
701
702 <#if selectedComune??>
703 <span class="white">${selectedComune}</span>
704 </#if>
705 </ol>
706 </nav>
707
708 </#if>
709 </div>
710 </div>
711 <div class="col-lg-1 col-md-2 col-sm-2 col-xs-4">
712 <div class="text-center float-right">
713 <div class="position-relative">
714 <button id="myButtonShare" class="pointer bg-transparent border-0" style="display:none;">
715 <p class="${ColoreTesto.getData()} title-bigger bold pt-lg-5 pt-4"></p>
716 <img alt=""
717 src="/o/gruppohera-theme/images/share-heart-${ColoreTesto.getData()}.png" />
718 <p class="sharetext black">${stringacondividi}</p>
719 </button>
720 <div id="myModalBreadcrumb" class="offerta-modal" style="min-width: 240px; display: none">
721 <div class="offerta-modal-content position-relative">
722 <div class="float-right">
723 <span id="close_offerta" class="close_offerta text-right close-icon">×</span>
724 </div>
725 <p class="h4 text-left mb-3 greyish-brown">Condividi</p>
726 <ul class="social__wrapper">
727 <li class="d-flex align-items-center mb-2">
728 <div class="mr-2" style="width: 40px; height: 40px;"><span
729 class="social__icon d-flex align-items-center justify-content-center icon-facebook social__iconFacebook"></span>
730 </div><a class="h6 mb-0 greyish-brown" id="facebook_share" href=""
731 target="_blank" style="font-size: 1.1rem;color: #018982;">Facebook</a>
732 </li>
733 <li class="d-flex align-items-center mb-2">
734 <div class="mr-2" style="width: 40px; height: 40px;"><span
735 class="social__icon d-flex align-items-center justify-content-center icon-linkedin social__iconLinkedIn"></span>
736 </div><a class="h6 mb-0 greyish-brown position-relative" id="linkedin_share"
737 href="" target="_blank" style="font-size: 1.1rem;color: #018982;">
738 LinkedIn
739 <div style="opacity: 0;top:0;" class="position-absolute w-100">
740 <script src="https://platform.linkedin.com/in.js"
741 type="text/javascript">lang: it_IT</script>
742 <script type="IN/Share"
743 data-url="https://www.gruppohera.it${currentURL}"></script>
744 </div>
745 </a>
746 </li>
747 <li class="d-flex align-items-center mb-2">
748 <div class="mr-2" style="width: 40px; height: 40px;"><img src="/documents/688182/0/logo-white-x.png/82ded04f-f3ee-3f23-e167-ed8a0cc95913?t=1707295919187"
749 class="social__icon d-flex align-items-center justify-content-center social__iconTwitter"></img>
750 </div><a class="h6 mb-0 greyish-brown" id="twitter_share" href=""
751 target="_blank" style="font-size: 1.1rem;color: #018982;">X</a>
752 </li>
753 <li class="d-flex align-items-center mb-2">
754 <div class="mr-2" style="width: 40px; height: 40px;">
755 <span
756 class="social__icon d-flex align-items-center justify-content-center social__iconWhatsapp text-left">
757 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
758 fill="#fff" viewBox="0 0 24 24">
759 <path
760 d="M.057 24l1.687-6.163c-1.041-1.804-1.588-3.849-1.587-5.946.003-6.556 5.338-11.891 11.893-11.891 3.181.001 6.167 1.24 8.413 3.488 2.245 2.248 3.481 5.236 3.48 8.414-.003 6.557-5.338 11.892-11.893 11.892-1.99-.001-3.951-.5-5.688-1.448l-6.305 1.654zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z" />
761 </svg>
762 </span>
763 </div>
764 <a class="h6 mb-0 greyish-brown" id="whatsApp_social" href="" target="_blank"
765 style="font-size: 1.1rem;color: #018982;">WhatsApp</a>
766 </li>
767 <li class="d-flex align-items-center mb-2">
768 <div class="mr-2" style="width: 40px; height: 40px;"><span
769 class="social__icon d-flex align-items-center justify-content-center icon-mail social__iconMail"></span>
770 </div><a class="h6 mb-0 greyish-brown"
771 href="https://mail.google.com/mail/?view=cm&fs=1&to=someone@example.com&su=Gruppo Hera&body=https://www.gruppohera.it${themeDisplay.getLayout().getFriendlyURL()}"
772 target="_blank" style="font-size: 1.1rem;color: #018982;">Email</a>
773 </li>
774 <li class="d-flex align-items-center mb-2">
775 <div class="mr-2" style="width: 40px; height: 40px;"><span
776 class="social__icon d-flex align-items-center justify-content-center icon-link social__iconCopyLink"></span>
777 </div><button
778 class="h6 mb-0 greyish-brown pointer bg-transparent border-0 social__titleWrapper text-left"
779 id="copyShareLinkButton" target="_blank"
780 style="font-size: 1.1rem;color: #018982;" onclick="copyShareLink()">Copia il
781 link</button>
782 </li>
783 </ul>
784 </div>
785 </div>
786 </div>
787 </div>
788 </div>
789 </div>
790 </div>
791</div>
792
793<#if currentURL?contains(assistenzaUrl)>
794 <#if currentURL?contains(ambienteUrl)>
795 <#assign mobileMenuClass="selectMenu__absolutePosition mb-4" />
796 <#else>
797 <#assign mobileMenuClass="" />
798 </#if>
799 <section id="assistenzamenu">
800 <div class="d-block d-lg-none mx-auto w-sm-75 w-md-100 px-4 ${mobileMenuClass} pt-4 pt-md-0">
801 <a id="select-menu" data-toggle="collapse" href="#collapse-menu-laterale" role="button" aria-expanded="true"
802 aria-controls="collapse-menu-laterale">
803 <div class="select-menu-container mt-2 bg-white">
804 <span class="text-uppercase color-gray">Assistenza</span>
805 <div id="root-arrow" class="icon-chevron-down root-arrow float-right mr-2 h-100"
806 style="/*writing-mode: vertical-lr;*/"></div>
807 </div>
808 </a>
809 <div class="collapse mx-4" id="collapse-menu-laterale">
810 <div class="py-3">
811 <div class="tilewrapper pl-5 pr-2">
812 ${breadcrumbBuckup}
813 </div>
814 </div>
815 </div>
816 </div>
817 </section>
818</#if>
819<script>
820
821 var shareModal = document.getElementById("myShareModal");
822 var shareBtn = document.getElementById("myShareBtn");
823 var shareCloseSpan = document.getElementsByClassName("my-share-close")[0];
824 var shareCloseBtn = document.getElementsByClassName("my-share-close-btn")[0];
825
826 if (shareBtn !== null) {
827 shareBtn.onclick = function() {
828 shareModal.style.display = "block";
829 $( "#copyShareLinkButton" ).prop( "disabled", false );
830 }
831 }
832
833 if (shareCloseSpan!==undefined && shareCloseSpan!="" && shareCloseSpan!== null){
834 shareCloseSpan.onclick = function() {
835 shareModal.style.display = "none";
836 $("#myShareCopiedToClipboard").remove();
837 }
838
839 shareCloseBtn.onclick = function() {
840 shareModal.style.display = "none";
841 $("#myShareCopiedToClipboard").remove();
842 $(".social__titleWrapper").text("Copia il link");
843 $(".social__titleWrapper").prop("disabled", false);
844 }
845 }
846
847 /* copy share link event */
848 function copyShareLink() {
849 navigator.clipboard.writeText(window.location.href);
850 $(".social__titleWrapper").text("Link Copiato!");
851 $(".social__titleWrapper").prop("disabled", true);
852 };
853
854 /* share social medial modal events */
855 var modal = document.getElementById("myModalBreadcrumb");
856 var btnShare = document.getElementById("myButtonShare");
857 var span = document.getElementById("close_offerta");
858
859 if (btnShare !== undefined && btnShare !== null) {
860 btnShare.onclick = function () {
861 console.log("cliccato")
862 modal.style.display = "block";
863 $("#copyLinkButton").prop("disabled", false);
864 }
865 }
866
867 // When the user clicks on <span> (x), close the modal
868 if (span !== undefined && span !== null) {
869 span.onclick = function () {
870 modal.style.display = "none";
871 $("#copiedToClipboard").remove();
872 $(".social__titleWrapper").text("Copia il link");
873 $(".social__titleWrapper").prop("disabled", false);
874 }
875 }
876 /* --share social medial modal events-- */
877
878 window.onclick = function(event) {
879 if (event.target == shareModal) {
880 shareModal.style.display = "none";
881 }
882 }
883
884
885 //Gestione Composizione Link Share Social
886 var url = window.location.href.includes("auth") ? window.location.href.replace("https://auth-", "https://") : window.location.href;
887 var encodedUri = encodeURI(url);
888
889 //LINKEDIN
890 function createLinkedinLink(url) {
891 var shareLink = "https://www.linkedin.com/shareArticle?mini=true&";
892 shareLink += "url=" + encodeURIComponent(url);
893 return shareLink;
894 }
895 var linkedinAncor = $("#linkedin_share");
896 linkedinAncor.attr("href", createLinkedinLink(encodedUri))
897
898 //FACEBOOK
899 function createFbShareLink(url) {
900 var shareLink = 'https://www.facebook.com/sharer/sharer.php?kid_directed_site=0&';
901 shareLink += 'u=' + encodeURIComponent(url);
902 shareLink += '&display=popup&ref=plugin&src=share_button';
903 return shareLink;
904 }
905 var facebookAncor = $("#facebook_share");
906 facebookAncor.attr("href", createFbShareLink(encodedUri));
907
908 //TWITTER
909 function createTwitterShareLink(url, title){
910 var shareLink = 'https://twitter.com/intent/tweet?';
911 shareLink += 'url=' + encodeURIComponent(url);
912 shareLink += '&text=' + 'Gruppo Hera -' + title;
913 return shareLink;
914 }
915 var twitterAncor = $("#twitter_share");
916 twitterAncor.attr("href", createTwitterShareLink(encodedUri, $("#pagename").text()));
917
918 //WHATSAPP
919 var whatsAppAncor = $("#whatsApp_social");
920 whatsAppAncor.attr("href", "https://wa.me/?text=" + encodeURIComponent(encodedUri));
921 /* ------ FINE GESTIONE SOCIAL ------ */
922
923 document.addEventListener('DOMContentLoaded', function() {
924 console.log("dom loaded");
925 function getHashParam() {
926 return window.location.hash.substring(1);
927 }
928
929 function openAccordion(collapseId) {
930 var collapseElement = document.getElementById(collapseId);
931 console.log("---> accordion")
932 if (collapseElement) {
933 var bootstrapCollapse = new bootstrap.Collapse(collapseElement, {
934 toggle: true
935 });
936 }
937 }
938
939 const accordionParam = getHashParam();
940
941 if (accordionParam) {
942 console.log("parametro esistente", accordionParam)
943 openAccordion(accordionParam);
944 }
945 });
946
947</script>
HeraAssetPublisherFilterComuneSelector
Aggregatore Risorse
Hera SpA, Viale Carlo Berti Pichat 2/4, 40127 Bologna, Tel.051287111 www.gruppohera.it