La boîte à outils du zéro carbone - La boîte à outils du zéro carbone

La boîte à outils du zéro carbone

Une erreur s'est produite en traitant le calibre.
No signature of method create matches the arguments
1<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
2<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.service.ClassNameLocalService") /> 
3<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
4<#assign journalStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") /> 
5<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
6 
7<#assign typeJournalArticle = "com.liferay.portlet.journal.model.JournalArticle" /> 
8 
9<#assign jaClassNameId = classNameLocalService.getClassNameId(typeJournalArticle) /> 
10 
11<#assign pdfViewer = '/fu/js/pdfjs/web/viewer.html?zoom=page-fit&file=' /> 
12 
13<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 
14<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 
15 
16<#assign carouselNb = 0 /> 
17<#assign keyNumbersInProgress = "false" /> 
18 
19<article class="interior-article" > 
20     
21    <#if Accroche.getData() != ""> 
22        <div class="useful-content"> 
23            <p class="interior-article-chapo">${Accroche.getData()}</p> 
24        </div> 
25    </#if> 
26 
27    <#if content.getSiblings()?has_content> 
28 
29        <#list content.getSiblings() as contenu> 
30 
31            <#if contenu.content_type.getData() != "keyNumber" && keyNumbersInProgress == "true" > 
32                </div></div> 
33                <#assign keyNumbersInProgress = "false" /> 
34            </#if> 
35 
36            <#if contenu.content_type.getData() == "oneColumn"> 
37                <@displayContent contenu=contenu columns="" /> 
38            <#elseif contenu.content_type.getData() == "twoColumns"> 
39                <@displayContent contenu=contenu columns="paragraph-columns" /> 
40            <#elseif contenu.content_type.getData() == "keyNumber"> 
41                <@displayKeyNumber contenu=contenu inProgress=keyNumbersInProgress /> 
42            </#if> 
43 
44        </#list> 
45 
46    </#if> 
47     
48</article> 
49 
50<ul class="share-buttons"> 
51    <li class="share-buttons-item share-buttons-item-eco"><a class="share-button share-button-eco inner-link" title="Un site éco-responsable" href="/un-site-eco-responsable"><span class="sr-only">Un site éco-responsable</span></a></li> 
52    <li class="share-buttons-item"><a class="share-button share-button-insta inner-link" title="Compte Instagram La Rochelle Territoire Zéro Carbone - Ouvrir dans un nouvel onglet" href="https://www.instagram.com/lrterritoirezerocarbone/" target="_blank" rel="noopener noreferrer"><span class="sr-only">Compte Instagram La Rochelle Territoire Zéro Carbone</span></a></li> 
53    <li class="share-buttons-item"><a class="share-button share-button-twitter inner-link" title="Page Twitter La Rochelle Territoire Zéro Carbone" href="https://twitter.com/LRzerocarbone" target="_blank" rel="noreferrer noopener"><span class="sr-only">Page Twitter La Rochelle Territoire Zéro Carbone</span></a></li> 
54    <li class="share-buttons-item"><a class="share-button share-button-mail inner-link" title="Nous contacter" href="/contact"><span class="sr-only">Nous contacter</span></a></li> 
55</ul> 
56 
57 
58<#--************************************* 
59** CONTENT BLOCKS DISPLAY 
60*************************************--> 
61 
62<#macro displayContent contenu columns > 
63 
64    <#assign flexMedia = "no-floating-media" /> 
65    <#assign alignValue = "" /> 
66    <#assign alignValue = contenu.Media.media_options.alignment.getData() /> 
67    <#if alignValue == "flexLeft" || alignValue == "flexRight"> 
68        <#assign flexMedia = "flex-media" /> 
69    </#if> 
70     
71    <#assign contentTitle = contenu.content_title.getData() /> 
72    <#assign contentText = contenu.content_text.getData() /> 
73    <#assign anchor = contenu.anchor.getData() /> 
74 
75    <#assign contentTitleDisplay = "" /> 
76    <#if contenu.content_title_display.getData() == "centerTitle" > 
77        <#assign contentTitleDisplay = "paragraph-title-center" /> 
78    <#elseif contenu.content_title_display.getData() == "blueTitle"> 
79        <#assign contentTitleDisplay = "paragraph-title-blue" /> 
80    </#if> 
81     
82    <#assign innerMedia = contenu.Media /> 
83    <#assign mediaSrc = innerMedia.media_doc.getData()/> 
84    <#assign urlIframePortlet = innerMedia.url_iframe_portlet.getData() /> 
85     
86    <#if contentTitle!="" || contentText!="" || mediaSrc!="" || urlIframePortlet !="" > 
87         
88        <#assign usefulContent = "useful-content" /> 
89        <#if contentTitleDisplay == "paragraph-title-blue"> 
90            <#assign usefulContent = "" /> 
91        </#if> 
92 
93        <div class="interior-article-paragraph ${usefulContent} ${flexMedia} ${columns}"> 
94             
95            <#if contentTitle != "" &&  ( !innerMedia?? || alignValue != "flexRight" ) > 
96                <h2 class="paragraph-title ${contentTitleDisplay}"><span class="paragraph-title-text">${contentTitle}</span></h2> 
97            </#if> 
98 
99            <#if contentTitleDisplay == "paragraph-title-blue"> 
100                <div class="interior-article-enhancedContent"> 
101            </#if> 
102             
103            <#if flexMedia == "no-floating-media" || !innerMedia?? > 
104                 
105                <#if columns == "paragraph-columns"> 
106                    <div class="two-columns"> 
107                        ${contentText?replace("<p></p>","")} 
108                    </div> 
109                <#else> 
110                    ${contentText?replace("<p></p>","")} 
111                </#if> 
112                <#if innerMedia??> 
113                    <@getMedia media=innerMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet alignment=alignValue /> 
114                </#if> 
115                 
116            <#elseif flexMedia == "flex-media" && innerMedia??> 
117                 
118                <div class="flex-media-paragraph ${alignValue}"> 
119                    <div class="flex-media-paragraph-content"> 
120                        <#if contentTitle != "" &&  alignValue == "flexRight" > 
121                            <h2 class="paragraph-title ${contentTitleDisplay}"><span class="paragraph-title-text">${contentTitle}</span></h2> 
122                        </#if> 
123                        ${contentText?replace("<p></p>","")} 
124                    </div> 
125                    <@getMedia media=innerMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet alignment=alignValue /> 
126                </div> 
127                 
128            </#if> 
129 
130            <#if contentTitleDisplay == "paragraph-title-blue"> 
131                </div> 
132            </#if> 
133 
134        </div> 
135         
136    </#if> 
137     
138</#macro> 
139 
140 
141<#--************************************* 
142** KEY NUMBERS DISPLAY 
143*************************************--> 
144 
145<#macro displayKeyNumber contenu inProgress > 
146 
147    <#if inProgress == "false"> 
148        <#assign keyNumbersInProgress = "true" /> 
149        <div class="interior-article-paragraph no-floating-media"> 
150            <h2 class="paragraph-title paragraph-title-enhanced"><span class="paragraph-title-text">Chiffres clés</span></h2> 
151                <div class="interior-article-contentsWrapper interior-article-keyNumbers useful-content"> 
152    </#if> 
153 
154    <#assign contentTitle = contenu.content_title.getData() /> 
155    <#assign contentText = contenu.content_text.getData() /> 
156 
157    <div class="interior-article-innerContent"> 
158        <h3 class="interior-article-keyNumber">${contentTitle}</h3> 
159        <p class="interior-article-keyNumber-text">${contentText?replace("<p>","")?replace("</p>","")}</p> 
160    </div> 
161 
162</#macro> 
163 
164 
165<#--************************************* 
166** MEDIA DISPLAY 
167*************************************--> 
168 
169<#macro getMedia media mediaSrc urlIframePortlet alignment> 
170     
171    <#if mediaSrc != '' || urlIframePortlet != ''> 
172 
173        <#local mediaType = media.media_type.getData() /> 
174        <#assign carouselWrapper = "" /> 
175        <#if mediaType == "carousel"> 
176            <#assign carouselWrapper = "interior-article-media-carousel-wrapper" /> 
177        </#if> 
178        <#local width = media.media_options.width.getData() /> 
179        <#local displayWidth = '' /> 
180        <#if width == 'null'> 
181            <#local displayWidth = '' /> 
182        <#elseif width != ""> 
183            <#local displayWidth = 'style="width:'+width+'px;"' /> 
184        </#if> 
185         
186        <#local height = media.media_options.height.getData() /> 
187        <#if height == 'null'> 
188            <#local height = '' /> 
189        </#if> 
190        <#local displayMode = media.media_options.display_mode.getData() /> 
191        <#local imgMini = media.media_options.img_mini.getData() /> 
192        <#local legend = media.media_options.legend.getData() /> 
193        <#local altText = media.alt_text.getData() /> 
194        <#if altText == 'null'> 
195            <#local altText = '' /> 
196        </#if> 
197         
198        <#local hasLegend = legend?length != 0 /> 
199        <#if hasLegend> 
200            <figure class="interior-article-media interior-article-media-${alignment} ${carouselWrapper}" ${displayWidth}> 
201        <#else> 
202            <div class="interior-article-media interior-article-media-${alignment} ${carouselWrapper}" ${displayWidth}> 
203        </#if> 
204             
205            <#switch mediaType> 
206                <#case "image"> 
207                    <#if displayMode == "normal"> 
208                       <@getImageMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
209                    <#elseif displayMode == "popup"> 
210                        <@getImageMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
211                    </#if> 
212                    <#break > 
213                <#case "video"> 
214                    <#if displayMode == "normal"> 
215                       <@getVideoMedia imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
216                    <#elseif displayMode == "popup"> 
217                        <@getVideoMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
218                    </#if> 
219                    <#break > 
220                <#case "pdf"> 
221                    <#if displayMode == "normal"> 
222                       <@getPdfMedia mediaSrc=mediaSrc altText=altText height=height /> 
223                    <#elseif displayMode == "popup"> 
224                        <@getPdfMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
225                    </#if> 
226                    <#break > 
227                <#case "carousel"> 
228                    <#if displayMode == "normal"> 
229                       <@getCarouselMedia media=media altText=altText height=height width=width /> 
230                    <#elseif displayMode == "popup"> 
231                        <@getCarouselMediaPopup imgMini=imgMini media=media altText=altText height=height width=width /> 
232                    </#if> 
233                    <#assign carouselNb = carouselNb + 1 /> 
234                    <#break > 
235                <#case "iframe"> 
236                    <#if displayMode == "normal"> 
237                       <@getIframeMedia urlIframePortlet=urlIframePortlet altText=altText height=height /> 
238                    <#elseif displayMode == "popup"> 
239                        <@getIframeMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
240                    </#if> 
241                    <#break > 
242                <#case "portlet"> 
243                    <#if displayMode == "normal"> 
244                       <@getPortletMedia urlIframePortlet=urlIframePortlet height=height /> 
245                    <#elseif displayMode == "popup"> 
246                        <@getPortletMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
247                    </#if> 
248                    <#break > 
249                <#default> 
250            </#switch> 
251 
252        <#if hasLegend> 
253                <figcaption class="interior-article-media-legend">${legend}</figcaption> 
254            </figure> 
255        <#else> 
256            </div> 
257        </#if> 
258         
259    </#if> 
260     
261</#macro> 
262 
263 
264<#macro getImageMedia mediaSrc urlIframePortlet altText height width > 
265    <#local displayedHeight = '' /> 
266    <#if height != ""> 
267        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
268    </#if> 
269    <#if urlIframePortlet != ""> 
270        <#assign target = "href='"+ urlIframePortlet +"'" /> 
271        <#if !isInternalLink(urlIframePortlet)> 
272            <#assign target = target + " target='_blank' rel='noopener noreferrer'" /> 
273        </#if> 
274        <a ${target} title="${htmlUtil.escapeAttribute(altText)}"> 
275            <img class="interior-article-media-image" src="${mediaSrc}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
276        </a> 
277    <#else> 
278        <img class="interior-article-media-image" src="${mediaSrc}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
279    </#if> 
280</#macro> 
281 
282 
283<#macro getImageMediaPopup imgMini mediaSrc altText height width > 
284    <#if imgMini != ""> 
285        <#local displayedHeight = '' /> 
286        <#if height != ""> 
287            <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
288        </#if> 
289        <a class="link-img" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}"> 
290            <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
291        </a> 
292    <#else> 
293        <h5> 
294            <a class="link-img" title="${htmlUtil.escapeAttribute(altText)}" href="${mediaSrc}"> 
295                ${htmlUtil.escapeAttribute(altText)} 
296            </a> 
297        </h5> 
298    </#if> 
299</#macro> 
300 
301 
302<#macro getVideoMedia imgMini mediaSrc height altText width> 
303    <#local displayedHeight = '' /> 
304    <#if height != ""> 
305        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
306    </#if> 
307    <video class="interior-article-media-video" itemprop="url" poster="${imgMini}" title="${htmlUtil.escapeAttribute(altText)}" controls="" preload="metadata" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> > 
308        <source itemprop="url" content="https://www2.larochelle-technopole.fr${mediaSrc}" src="${mediaSrc}" type="video/mp4"> 
309        <a href="${mediaSrc}" download="">${htmlUtil.escapeAttribute(altText)}</a> 
310    </video> 
311</#macro> 
312 
313 
314<#macro getVideoMediaPopup imgMini mediaSrc altText height width > 
315    <#if imgMini != ""> 
316        <#local displayedHeight = '' /> 
317        <#if height != ""> 
318            <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
319        </#if> 
320        <a class="link-video" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}"> 
321            <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
322        </a> 
323    <#else> 
324        <h5> 
325            <a class="link-video" title="${htmlUtil.escapeAttribute(altText)}" href="${mediaSrc}"> 
326                ${htmlUtil.escapeAttribute(altText)} 
327            </a> 
328        </h5> 
329    </#if> 
330</#macro> 
331 
332 
333<#macro getPdfMedia mediaSrc altText height > 
334    <#local displayedHeight = '' /> 
335    <#if height != ""> 
336        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
337    </#if> 
338    <iframe class="interior-article-media-iframe" src="${pdfViewer+mediaSrc}" loading="lazy" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ></iframe> 
339</#macro> 
340 
341 
342<#macro getPdfMediaPopup imgMini mediaSrc altText height width > 
343    <#if imgMini != ""> 
344        <#local displayedHeight = '' /> 
345        <#if height != ""> 
346            <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
347        </#if> 
348        <a class="link-pdf" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" target="_blank" rel="noopener noreferrer"> 
349            <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
350        </a> 
351    <#else> 
352        <h5> 
353            <a class="link-pdf" title="${htmlUtil.escapeAttribute(altText)}" href="${mediaSrc}" target="_blank" rel="noopener noreferrer"> 
354                ${htmlUtil.escapeAttribute(altText)} 
355            </a> 
356        </h5> 
357    </#if> 
358</#macro> 
359 
360 
361<#macro getCarouselMedia media altText height width >  
362     
363    <#local ratioDisplay = "" /> 
364    <#if height != "" && width != "" > 
365        <#local ratio = height?number / width?number * 100 /> 
366        <#local ratioDisplay = 'style="padding-top:' + ratio + '%"' /> 
367    </#if> 
368     
369    <div class="carousel" id="carousel-${carouselNb}" data-carousel="carousel-${carouselNb}" ${ratioDisplay}> 
370         
371        <button type="button" id="carousel-${carouselNb}-arrow-prev" data-carousel="carousel-${carouselNb}" data-direction="prev" class="carousel-arrow carousel-arrow-prev"><span class="sr-only">Image précédente</span></button> 
372        <button type="button" id="carousel-${carouselNb}-arrow-next" data-carousel="carousel-${carouselNb}" data-direction="next" class="carousel-arrow carousel-arrow-next"><span class="sr-only">Image suivante</span></button> 
373 
374        <#list media.media_doc.getSiblings() as node> 
375            <#if node_index == 0> 
376                <img id="carousel-${carouselNb}-img-${node_index}" data-carousel="carousel-${carouselNb}" data-img="${node_index}" class="carousel-img carousel-img-displayed" src="${node.getData()}" data-src="" alt="${altText}"> 
377            <#else> 
378                <img id="carousel-${carouselNb}-img-${node_index}" data-carousel="carousel-${carouselNb}" data-img="${node_index}" class="carousel-img carousel-img-noDisplay" src="/lr-zerocarbone-theme/images/blank.png" data-src="${node.getData()}" alt="${altText}"> 
379            </#if> 
380        </#list> 
381 
382        <ul class="carousel-buttons"> 
383            <#list media.media_doc.getSiblings() as node> 
384                <#local currentClass = "" /> 
385                <#if node_index == 0> 
386                    <#local currentClass = "carousel-button-current" /> 
387                </#if> 
388                <li class="carousel-buttons-item"><button type="button" id="carousel-${carouselNb}-arrow-${node_index}" class="carousel-button ${currentClass}" data-carousel="carousel-${carouselNb}" data-img="${node_index}"><span class="sr-only">Image ${node_index+1}</span></button></li> 
389            </#list> 
390        </ul> 
391 
392    </div> 
393 
394</#macro> 
395 
396<#macro getCarouselMediaPopup imgMini media altText height width > 
397    <#local diapos = "" /> 
398    <#list media.media_doc.getSiblings() as node> 
399        <#if node_index != 0> 
400            <#local diapos = diapos + "," /> 
401        </#if> 
402        <#local diapos = diapos + node.getData() /> 
403    </#list> 
404    <#if imgMini != ""> 
405        <#local displayedHeight = '' /> 
406        <#if height != ""> 
407            <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
408        </#if> 
409        <a class="link-diapo" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" data-diapos="${diapos}"> 
410            <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
411        </a> 
412    <#else> 
413        <h5> 
414            <a class="link-diapo" title="${htmlUtil.escapeAttribute(altText)}" href="${mediaSrc}" data-diapos="${diapos}"> 
415                ${htmlUtil.escapeAttribute(altText)} 
416            </a> 
417        </h5> 
418    </#if> 
419</#macro> 
420 
421 
422<#macro getIframeMedia urlIframePortlet altText height > 
423    <#local displayedHeight = '' /> 
424    <#if height != ""> 
425        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
426    </#if> 
427    <#if urlIframePortlet?contains("youtube")> 
428        <#local youtubeId = urlIframePortlet?substring(urlIframePortlet?index_of("embed/")+6) /> 
429        <div class="interior-article-media-youtube-blocker" ${displayedHeight}> 
430            <div class="youtube-blocker-img-wrapper"> 
431                <img class="youtube-blocker-img" src="https://img.youtube.com/vi/${youtubeId}/0.jpg" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" /> 
432            </div> 
433            <p class="youtube-blocker-text">Cette vidéo est fournie par la plateforme YouTube. En la visionnant vous acceptez les conditions d'utilisation de YouTube.</p> 
434            <div class="youtube-blocker-btn-wrapper"> 
435                <button type="button" class="youtube-blocker-btn" data-src="${urlIframePortlet?replace('youtube.com','youtube-nocookie.com')}?autoplay=1" data-title="${htmlUtil.escapeAttribute(altText)}">Voir la vidéo</button> 
436                <a href="https://www.youtube.com/static?template=terms&gl=FR" class="youtube-blocker-btn" target="_blank" rel="noopener noreferrer">En savoir plus</a> 
437            </div> 
438        </div> 
439    <#else> 
440        <#assign ariaHidden = '' /> 
441        <#if urlIframePortlet?contains("/carto/")> 
442            <#assign ariaHidden = 'aria-hidden="true"' /> 
443        </#if> 
444        <iframe class="interior-article-media-iframe" src="${urlIframePortlet}" loading="lazy" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} ${ariaHidden} allowfullscreen ></iframe> 
445    </#if> 
446</#macro> 
447 
448 
449<#macro getIframeMediaPopup imgMini urlIframePortlet altText height width > 
450    <#if imgMini != ""> 
451        <#local displayedHeight = '' /> 
452        <#if height != ""> 
453            <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
454        </#if> 
455        <a class="link-iframe" href="${urlIframePortlet}" title="${htmlUtil.escapeAttribute(altText)}" target="_blank" rel="noopener noreferrer"> 
456            <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
457        </a> 
458    <#else> 
459        <h5> 
460            <a class="link-iframe" title="${htmlUtil.escapeAttribute(altText)}" href="${urlIframePortlet}" target="_blank" rel="noopener noreferrer"> 
461                ${htmlUtil.escapeAttribute(altText)} 
462            </a> 
463        </h5> 
464    </#if> 
465</#macro> 
466 
467 
468<#macro getPortletMedia urlIframePortlet height > 
469     
470    <#local displayedHeight = '' /> 
471    <#if height != ""> 
472        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
473    </#if> 
474     
475    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
476    <#local hasQueryString = urlIframePortlet?contains('?') /> 
477    <#local queryString = '' /> 
478    <#local instanceId = '' /> 
479    <#local portletName = urlIframePortlet /> 
480    <#local portletId = urlIframePortlet /> 
481    <#local fullPortletName = '' /> 
482     
483    <#if hasInstanceId> 
484        <#if hasQueryString> 
485            <#local instanceId = urlIframePortlet[(urlIframePortlet?index_of('INSTANCE')+9)..urlIframePortlet?index_of('?')-1] /> 
486        <#else> 
487            <#local instanceId = urlIframePortlet[(urlIframePortlet?index_of('INSTANCE')+9)..] /> 
488        </#if> 
489        <#local portletName = urlIframePortlet[0..(urlIframePortlet?index_of('INSTANCE'))-2] /> 
490    <#else> 
491        <#if hasQueryString> 
492            <#local portletName = urlIframePortlet[0..(urlIframePortlet?index_of('?'))-1] /> 
493        </#if> 
494    </#if> 
495     
496    <#if hasQueryString> 
497        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
498    </#if> 
499     
500    <#if hasInstanceId> 
501        <#local fullPortletName = portletName+'_INSTANCE_'+instanceId /> 
502    <#else> 
503         <#local fullPortletName = portletName /> 
504    </#if> 
505 
506    <#local divId = "embedded-portlet-" + fullPortletName + randomNamespace /> 
507     
508    <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') || urlIframePortlet?contains('cuCreate')> 
509         
510        <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive&currentURL=" + themeDisplay.getURLCurrent() /> 
511 
512        <div id="${divId}" class="embedded-portlet" data-portlet="${fullPortletName}" data-remote-url="" data-querystring="${queryString}" ${displayedHeight}></div> 
513         
514    <#else> 
515         
516        <#local plid = themeDisplay.plid /> 
517        <#local portletURL = portletURLFactory.create(renderRequest, fullPortletName, plid, "RENDER_PHASE") /> 
518        <#local windowState = windowStateFactory.getWindowState("EXCLUSIVE") /> 
519        ${portletURL.setWindowState(windowState)} 
520        <#local remoteUrl = portletURL.toString() + "&" + queryString + "&currentURL=" + themeDisplay.getURLCurrent() /> 
521         
522        <div id="${divId}" class="embedded-portlet" data-portlet="${fullPortletName}" data-remote-url="${remoteUrl}" data-querystring="${queryString}" ${displayedHeight}></div> 
523         
524    </#if> 
525     
526</#macro> 
527 
528 
529<#macro getPortletMediaPopup imgMini urlIframePortlet altText height width > 
530     
531    <#local displayedHeight = '' /> 
532    <#if height != ""> 
533        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
534    </#if> 
535 
536    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
537    <#local hasQueryString = urlIframePortlet?contains('?') /> 
538    <#local portletId = urlIframePortlet /> 
539    <#local queryString = '' /> 
540     
541    <#if hasInstanceId> 
542        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
543    </#if> 
544    <#if hasQueryString> 
545        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
546        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
547    </#if> 
548     
549    <#local divId = "embedded-portlet-" + portletId /> 
550         
551    <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice')> 
552         
553        <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive&currentURL=" +themeDisplay.getURLCurrent() /> 
554         
555        <#local formPictoClass = "" /> 
556        <#if urlIframePortlet?contains('FiberOpticalConnectionRequest')> 
557            <#local formPictoClass = "eservice-form-opener-picto-fiber" /> 
558        <#elseif urlIframePortlet?contains('AntContact')> 
559            <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
560        <#elseif urlIframePortlet?contains('ReinscriptionConservatoire')> 
561            <#local formPictoClass = "eservice-form-opener-picto-music" /> 
562        <#elseif urlIframePortlet?contains('ContactUs')> 
563            <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
564        <#elseif urlIframePortlet?contains('JobApplication')> 
565            <#local formPictoClass = "eservice-form-opener-picto-job" /> 
566        <#elseif urlIframePortlet?contains('WastebinRepair')> 
567            <#local formPictoClass = "eservice-form-opener-picto-wastebin" /> 
568        <#elseif urlIframePortlet?contains('WastewaterConnection')> 
569            <#local formPictoClass = "eservice-form-opener-picto-water" /> 
570        <#elseif urlIframePortlet?contains('WastesortingTour')> 
571            <#local formPictoClass = "eservice-form-opener-picto-altriane" /> 
572        </#if> 
573         
574        <div class="link-portlet eservice-form-opener" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" tabindex="0"> 
575            <div class="eservice-form-opener-picto ${formPictoClass}"></div> 
576            <p class="eservice-form-opener-text">${htmlUtil.escapeAttribute(altText)}</p> 
577        </div> 
578 
579    <#else> 
580         
581        <#local portletClass = "link-portlet" /> 
582        <#if urlIframePortlet?contains('19_WAR')> 
583            <#local portletClass = "link-portlet planning-cmd-opener" /> 
584        </#if> 
585        <#local plid = themeDisplay.plid /> 
586        <#local portletURL = portletURLFactory.create(renderRequest, portletId, plid, "RENDER_PHASE") /> 
587        <#local windowState = windowStateFactory.getWindowState("EXCLUSIVE") /> 
588        ${portletURL.setWindowState(windowState)} 
589        <#local remoteUrl = portletURL.toString() + "&" + queryString + "&currentURL=" + themeDisplay.getURLCurrent() /> 
590         
591        <div class="${portletClass}" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" tabindex="0"> 
592            <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
593        </div> 
594     
595    </#if> 
596     
597</#macro> 
598 
599 
600<#function isInternalLink link> 
601  <#local internal = link?contains("www.larochelle-zerocarbone.fr") || link?contains("www2.larochelle-zerocarbone.fr") || !link?contains("//")> 
602  <#return internal> 
603</#function>