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

Retour

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