Plan local d'urbanisme intercommunal (PLUi)

Généralisé par la loi du 12 juillet 2010 dite loi « Grenelle 2 », le Plan Local d'Urbanisme intercommunal a été approuvé par le Conseil communautaire le 19 décembre 2019.

Plan Local d'Urbanisme intercommunal (PLUi)

Une erreur s'est produite en traitant le calibre.
?index_of(...) expects a string as its first argument.
1<#-- 
2Application display templates can be used to modify the look of a 
3specific application. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--> 
8 
9<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
10<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetLinkLocalService") /> 
11<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.service.ClassNameLocalService") /> 
12<#assign bookmarksEntryLocalService = serviceLocator.findService("com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService") /> 
13<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
14<#assign journalStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") /> 
15<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
16 
17<#assign typeJournalArticle = "com.liferay.portlet.journal.model.JournalArticle" /> 
18<#assign typeBookmarksEntry = "com.liferay.portlet.bookmarks.model.BookmarksEntry" /> 
19<#assign typeDLFileEntry = "com.liferay.portlet.documentlibrary.model.DLFileEntry" /> 
20 
21<#assign journalArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
22<#assign entry = assetEntryLocalService.getEntry(typeJournalArticle, journalArticle.getResourcePrimKey()) /> 
23<#assign relatedAssetTypedLists = buildRelatedAssetTypedLists(entry, "false") /> 
24 
25<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 
26<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 
27 
28<#assign layout = themeDisplay['plid'] /> 
29<#assign layoutService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") /> 
30<#assign layoutObject = layoutService.getLayout(layout?number) /> 
31 
32<#assign jaClassNameId = classNameLocalService.getClassNameId(typeJournalArticle) /> 
33 
34<#assign pdfViewer = '/fu/js/pdfjs/web/viewer.html?zoom=page-fit&file=' /> 
35 
36<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 
37<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 
38 
39<#assign carouselNb = 0 /> 
40<#assign anchorNb = 0 /> 
41 
42<#-- ARTICLE CONTAINER --> 
43 
44<div class="interior-article-container"> 
45     
46    <article class="interior-article interior-article-displayed interior-article-displayed-full"> 
47         
48        <section class="interior-article-mainContent"> 
49             
50            <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
51                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_ZOOM_SUR" /> 
52            </#if> 
53             
54            <h2>${.vars['reserved-article-title'].data}</h2> 
55             
56            <#if Accroche.getData() != ""> 
57                <p class="interior-article-chapo">${Accroche.getData()}</p> 
58            </#if> 
59             
60            <#if Contenu.getSiblings()?has_content> 
61                <#list Contenu.getSiblings() as content> 
62                     
63                    <#assign isAccordion = "" /> 
64                    <#assign isZoomed = content.par_zoom.getData() /> 
65                    <#if isZoomed == "true" > 
66                        <#assign isAccordion = "accordion-paragraph" /> 
67                    </#if> 
68                     
69                    <#assign zoomedParagraph = "" /> 
70                    <#assign isZoomed = content.par_zoom.getData() /> 
71                    <#if isZoomed == "true" > 
72                        <#assign zoomedParagraph = "zoomed-paragraph" /> 
73                    </#if> 
74                     
75                    <#assign floatingMedia = "no-floating-media" /> 
76                    <#assign alignValue = "" /> 
77                    <#assign alignValue = content.Media.alignment.getData() /> 
78                    <#if alignValue == "fLeft" || alignValue == "fRight" > 
79                        <#assign floatingMedia = "floating-media" /> 
80                    <#elseif alignValue == "flexLeft" || alignValue == "flexRight"> 
81                        <#assign floatingMedia = "flex-media" /> 
82                    </#if> 
83                     
84                    <#assign contentTitle = content.content_title.getData() /> 
85                     
86                    <#assign mediaSrc = "" /> 
87                    <#assign urlIframePortlet = "" /> 
88                     
89                    <#if content.Media?? && content.Media?has_content > 
90                        <#assign mediaSrc = content.Media.getData()/> 
91                        <#assign urlIframePortlet = content.Media.url_iframe_portlet.getData() /> 
92                    </#if> 
93                     
94                     
95                    <#if contentTitle!="" || content.getData()!="" || mediaSrc!="" || urlIframePortlet !="" > 
96                         
97                        <div class="interior-article-paragraph ${zoomedParagraph} ${floatingMedia}"> 
98                             
99                            <#assign anchor = '' /> 
100                            <#if content.anchor?has_content> 
101                                <#assign anchor = content.anchor.getData() /> 
102                                <#if anchor != "" > 
103                                    <#assign anchor = 'id="'+anchor+'"' /> 
104                                </#if> 
105                            </#if> 
106                             
107                            <#if contentTitle != '' > 
108                                <#if isAccordion=="accordion-paragraph"> 
109                                    <h3 ${anchor} class="accordion-title accordion-title-expanded"><button type="button" class="accordion-title-button" id="accord-btn-${anchorNb}" aria-controls="accord-sect-${anchorNb}" aria-expanded="true">${contentTitle}</button></h3> 
110                                <#else> 
111                                    <h3 ${anchor}>${contentTitle}</h3> 
112                                </#if> 
113                            </#if> 
114                             
115                            <#if contentTitle != '' && isAccordion=="accordion-paragraph"> 
116                                <div class="accordion-content" role="region" id="accord-sect-${anchorNb}" aria-labelledby="accord-btn-${anchorNb}"> 
117                                <#assign anchorNb = anchorNb + 1 /> 
118                            </#if> 
119                             
120                            <#if floatingMedia == "no-floating-media" > 
121                             
122                                ${content.getData()?replace("<p></p>","")} 
123                                <#if content.Media?? && content.Media?has_content > 
124                                    <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
125                                </#if> 
126                                 
127                            <#elseif floatingMedia == "floating-media"> 
128                             
129                                <#if content.Media?? && content.Media?has_content > 
130                                    <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
131                                </#if> 
132                                ${content.getData()?replace("<p></p>","")} 
133                                <div class="clear-float"></div> 
134                                 
135                             <#elseif floatingMedia == "flex-media"> 
136                              
137                                <div class="flex-display flex-media-paragraph ${alignValue}"> 
138                                    <#if content.Media?? && content.Media?has_content > 
139                                        <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
140                                    </#if> 
141                                    <div class="flex-media-paragraph-content"> 
142                                        ${content.getData()?replace("<p></p>","")} 
143                                    </div> 
144                                </div> 
145                                 
146                            </#if> 
147                             
148                            <#if contentTitle != '' && isAccordion=="accordion-paragraph"> 
149                                </div> 
150                            </#if> 
151                             
152                        </div> 
153                         
154                    </#if> 
155 
156                </#list> 
157            </#if> 
158              
159        </section> 
160         
161        <@getCustomRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists /> 
162         
163    </article> 
164     
165    <footer class="interior-article-footer"> 
166        <ul class="interior-article-footer-items-list"> 
167            <li class="interior-article-footer-item interior-article-profile"><a class="inner-link" href="/tableau-de-bord" title="Gérer mon profil"><span class="sr-only">Mon profil</span></a></li> 
168        <li class="interior-article-footer-item interior-article-rss"><a class="inner-link" href="/les-flux-rss-de-l-agglo"><span class="sr-only">Les flux RSS de l'agglo</span></a></li> 
169        <li class="interior-article-footer-item interior-article-print"><button type="button" class="inner-link" title="Imprimer"><span class="sr-only">Imprimer</span></button></li> 
170        <li class="interior-article-footer-item interior-article-mail"><button type="button" class="inner-link" title="Partager par mail"><span class="sr-only">Partager par mail</span></button></li> 
171        <li class="interior-article-footer-item interior-article-linkedin"><button type="button" class="inner-link" title="Partager sur LinkedIn"><span class="sr-only">Partager sur LinkedIn</span></button></li> 
172        <li class="interior-article-footer-item interior-article-twitter"><button type="button" class="inner-link" title="Partager sur Twitter"><span class="sr-only">Partager sur Twitter</span></button></li> 
173        <li class="interior-article-footer-item interior-article-facebook"><button type="button" class="inner-link" title="Partager sur Facebook"><span class="sr-only">Partager sur Facebook</span></button></li> 
174        </ul> 
175    </footer> 
176     
177</div> 
178 
179<#-- FOOTER CONTACT --> 
180 
181<footer class="interior-content-footer interior-content-footer-displayed"> 
182     
183    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
184        <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_CONTACT_SERVICE" /> 
185    <#else> 
186        <@getDefaultFooterContact /> 
187    </#if> 
188 
189</footer> 
190 
191 
192<#--************************************* 
193** MEDIA DISPLAY 
194*************************************--> 
195 
196<#macro getMedia media urlIframePortlet> 
197     
198    <#local mediaSrc = media.getData()/> 
199     
200    <#if mediaSrc != '' || urlIframePortlet != ''> 
201         
202        <#local mediaType = media.media_type.getData() /> 
203        <#assign carouselWrapper = "" /> 
204        <#if mediaType == "carousel"> 
205            <#assign carouselWrapper = "interior-article-media-carousel-wrapper" /> 
206        </#if> 
207        <#local width = media.width.getData() /> 
208        <#local displayWidth = '' /> 
209        <#if width == 'null'> 
210            <#local displayWidth = '' /> 
211        <#elseif width != ""> 
212            <#local displayWidth = 'style="width:'+width+'px;"' /> 
213        </#if> 
214         
215        <#local height = media.height.getData() /> 
216        <#if height == 'null'> 
217            <#local height = '' /> 
218        </#if> 
219        <#local displayMode = media.display_mode.getData() /> 
220        <#local imgMini = media.img_mini.getData() /> 
221        <#local alignment = media.alignment.getData() /> 
222        <#local legend = media.legend.getData() /> 
223        <#local altText = media.alt_text.getData() /> 
224        <#if altText == 'null'> 
225            <#local altText = '' /> 
226        </#if> 
227         
228        <figure class="interior-article-media interior-article-media-${alignment} ${carouselWrapper}" ${displayWidth}> 
229             
230            <#switch mediaType> 
231                <#case "image"> 
232                    <#if displayMode == "normal"> 
233                       <@getImageMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
234                    <#elseif displayMode == "popup"> 
235                        <@getImageMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
236                    </#if> 
237                    <#break > 
238                <#case "video"> 
239                    <#if displayMode == "normal"> 
240                       <@getVideoMedia imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
241                    <#elseif displayMode == "popup"> 
242                        <@getVideoMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
243                    </#if> 
244                    <#break > 
245                <#case "pdf"> 
246                    <#if displayMode == "normal"> 
247                       <@getPdfMedia mediaSrc=mediaSrc altText=altText height=height /> 
248                    <#elseif displayMode == "popup"> 
249                        <@getPdfMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
250                    </#if> 
251                    <#break > 
252                <#case "iframe"> 
253                    <#if displayMode == "normal"> 
254                       <@getIframeMedia urlIframePortlet=urlIframePortlet altText=altText height=height /> 
255                    <#elseif displayMode == "popup"> 
256                        <@getIframeMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
257                    </#if> 
258                    <#break > 
259                <#case "svg"> 
260                    <#if displayMode == "normal"> 
261                       <@getSvgMedia mediaSrc=mediaSrc height=height /> 
262                    <#elseif displayMode == "popup"> 
263                        <@getSvgMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
264                    </#if> 
265                    <#break > 
266                <#case "flash"> 
267                    <#if displayMode == "normal"> 
268                       <@getFlashMedia mediaSrc=mediaSrc height=height /> 
269                    <#elseif displayMode == "popup"> 
270                        <@getFlashMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
271                    </#if> 
272                    <#break > 
273                <#case "portlet"> 
274                    <#if displayMode == "normal"> 
275                       <@getPortletMedia urlIframePortlet=urlIframePortlet height=height /> 
276                    <#elseif displayMode == "popup"> 
277                        <@getPortletMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
278                    </#if> 
279                    <#break > 
280                <#case "flickr"> 
281                    <#if displayMode == "normal"> 
282                       <@getFlickrMedia urlIframePortlet=urlIframePortlet /> 
283                    <#elseif displayMode == "popup"> 
284                        <@getFlickrMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
285                    </#if> 
286                    <#break > 
287                <#case "gallery"> 
288                    <#if displayMode == "normal"> 
289                       <@getGalleryMedia mediaSrc=mediaSrc height=height /> 
290                    <#elseif displayMode == "popup"> 
291                        <@getGalleryMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
292                    </#if> 
293                    <#break > 
294                <#case "carousel"> 
295                    <#if displayMode == "normal"> 
296                       <@getCarouselMedia media=media mediaSrc=mediaSrc altText=altText height=height width=width /> 
297                       <#assign carouselNb = carouselNb + 1 /> 
298                    <#elseif displayMode == "popup"> 
299                        <@getCarouselMediaPopup imgMini=imgMini media=media mediaSrc=mediaSrc altText=altText height=height width=width /> 
300                    </#if> 
301                    <#break > 
302                <#default> 
303            </#switch> 
304             
305            <#local hasLegend = legend?length != 0 /> 
306            <#if hasLegend> 
307                <figcaption class="interior-article-media-legend">${legend}</figcaption> 
308            </#if> 
309             
310        </figure> 
311         
312    </#if> 
313     
314</#macro> 
315 
316 
317<#macro getImageMedia mediaSrc urlIframePortlet altText height width > 
318    <#local displayedHeight = '' /> 
319    <#if height != ""> 
320        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
321    </#if> 
322    <#if urlIframePortlet != ""> 
323        <#assign target = "href='"+ urlIframePortlet +"'" /> 
324        <#if !isInternalLink(urlIframePortlet)> 
325            <#assign target = target + " target='_blank' rel='noopener noreferrer'" /> 
326        </#if> 
327        <a ${target}> 
328    </#if> 
329    <img class="interior-article-media-image" src="${mediaSrc}" loading="lazy" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
330    <#if urlIframePortlet != ""> 
331        </a> 
332    </#if> 
333</#macro> 
334 
335 
336<#macro getImageMediaPopup imgMini mediaSrc altText height width > 
337    <#local displayedHeight = '' /> 
338    <#if height != ""> 
339        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
340    </#if> 
341    <a class="link-img" href="${mediaSrc}" title="${altText}"> 
342        <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
343    </a> 
344</#macro> 
345 
346 
347<#macro getVideoMedia imgMini mediaSrc height altText width> 
348    <#local displayedHeight = '' /> 
349    <#if height != ""> 
350        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
351    </#if> 
352    <video class="interior-article-media-video" itemprop="url" poster="${imgMini}" title="${htmlUtil.escapeAttribute(altText)}"  
353    controls="" preload="auto" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> > 
354        <source itemprop="url" content="https://www2.larochelle-technopole.fr${mediaSrc}" src="${mediaSrc}" type="video/mp4"> 
355        <a href="${mediaSrc}" download="">${htmlUtil.escapeAttribute(altText)}</a> 
356    </video> 
357</#macro> 
358 
359 
360<#macro getVideoMediaPopup imgMini mediaSrc altText height width > 
361    <#local displayedHeight = '' /> 
362    <#if height != ""> 
363        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
364    </#if> 
365    <a class="link-video" href="${mediaSrc}" title="${altText}"> 
366        <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> /> 
367    </a> 
368</#macro> 
369 
370 
371<#macro getPdfMedia mediaSrc altText height > 
372    <#local displayedHeight = '' /> 
373    <#if height != ""> 
374        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
375    </#if> 
376    <iframe class="interior-article-media-iframe" src="${pdfViewer+mediaSrc}" loading="lazy" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ></iframe> 
377</#macro> 
378 
379 
380<#macro getPdfMediaPopup imgMini mediaSrc altText height width > 
381    <#local displayedHeight = '' /> 
382    <#if height != ""> 
383        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
384    </#if> 
385    <a class="popup-img-opener" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" target="_blank" rel="noopener noreferrer"> 
386        <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> /> 
387    </a> 
388</#macro> 
389 
390 
391<#macro getIframeMedia urlIframePortlet altText height > 
392    <#local displayedHeight = '' /> 
393    <#if height != ""> 
394        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
395    </#if> 
396    <#if urlIframePortlet?contains("youtube")> 
397        <#local youtubeId = urlIframePortlet?substring(urlIframePortlet?index_of("embed/")+6) /> 
398        <div class="interior-article-media-youtube-blocker" ${displayedHeight}> 
399            <div class="youtube-blocker-img-wrapper"> 
400                <img class="youtube-blocker-img" src="https://img.youtube.com/vi/${youtubeId}/0.jpg" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" /> 
401            </div> 
402            <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> 
403            <div class="youtube-blocker-btn-wrapper"> 
404                <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> 
405                <a href="https://www.youtube.com/static?template=terms&gl=FR" class="youtube-blocker-btn" target="_blank" rel="noopener noreferrer">En savoir plus</a> 
406            </div> 
407        </div> 
408    <#else> 
409        <iframe class="interior-article-media-iframe" src="${urlIframePortlet}" loading="lazy" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ></iframe> 
410    </#if> 
411</#macro> 
412 
413 
414<#macro getIframeMediaPopup imgMini urlIframePortlet altText height width > 
415    <#local displayedHeight = '' /> 
416    <#if height != ""> 
417        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
418    </#if> 
419    <a class="link-iframe" href="${urlIframePortlet}" target="_blank" rel="noopener noreferrer"> 
420        <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
421    </a> 
422</#macro> 
423 
424 
425<#macro getSvgMedia mediaSrc height > 
426 
427</#macro> 
428 
429 
430<#macro getSvgMediaPopup imgMini mediaSrc altText height > 
431 
432</#macro> 
433 
434 
435<#macro getFlashMedia mediaSrc height > 
436    <#local displayedHeight = '' /> 
437    <#if height != ""> 
438        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
439    </#if> 
440    <object class="interior-article-media-object" type="application/x-shockwave-flash"  data="${mediaSrc}" ${displayedHeight}></object>  
441</#macro> 
442 
443 
444<#macro getFlashMediaPopup imgMini mediaSrc altText height > 
445    <#local displayedHeight = '' /> 
446    <#if height != ""> 
447        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
448    </#if> 
449    <a class="link-flash" href="${mediaSrc}"> 
450        <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${altText}" ${displayedHeight} /> 
451    </a> 
452</#macro> 
453 
454 
455<#macro getPortletMedia urlIframePortlet height > 
456     
457    <#local displayedHeight = '' /> 
458    <#if height != ""> 
459        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
460    </#if> 
461     
462    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
463    <#local hasQueryString = urlIframePortlet?contains('?') /> 
464    <#local portletId = urlIframePortlet /> 
465    <#local queryString = '' /> 
466     
467    <#if hasInstanceId> 
468        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
469    </#if> 
470    <#if hasQueryString> 
471        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
472        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
473    </#if> 
474     
475    <#local divId = "embedded-portlet-" + portletId /> 
476    <#local plid = themeDisplay.plid /> 
477     
478    <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') || urlIframePortlet?contains('cuCreate')> 
479        <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
480     
481        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" ${displayedHeight}></div> 
482         
483    <#else> 
484         
485        <#local remoteUrl = "/c/portal/layout?p_l_id="+plid+"&p_p_id="+portletId+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive"+queryString /> 
486         
487        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" ${displayedHeight}></div> 
488         
489    </#if> 
490     
491</#macro> 
492 
493 
494<#macro getPortletMediaPopup imgMini urlIframePortlet altText height width > 
495       
496    <#local divId = "embedded-portlet-" + urlIframePortlet /> 
497     
498    <#local displayedHeight = '' /> 
499    <#if height != ""> 
500        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
501    </#if> 
502     
503    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
504    <#local hasQueryString = urlIframePortlet?contains('?') /> 
505    <#local portletId = urlIframePortlet /> 
506    <#local queryString = '' /> 
507 
508    <#if hasInstanceId> 
509        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
510    </#if> 
511    <#if hasQueryString> 
512        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
513        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
514    </#if> 
515     
516    <#if themeDisplay?? && themeDisplay.plid?? > 
517         
518        <#local plid = themeDisplay.plid /> 
519         
520        <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') > 
521            <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
522      
523            <#local formTitle = "" /> 
524            <#local formPictoClass = "" /> 
525            <#if urlIframePortlet?contains('FiberOpticalConnectionRequest')> 
526                <#local formTitle = "Demande d'information pour le raccordement à la fibre optique" /> 
527                <#local formPictoClass = "eservice-form-opener-picto-fiber" /> 
528            <#elseif urlIframePortlet?contains('AntContact')> 
529                <#local formTitle = "Contacter l'aménagement numérique du territoire" /> 
530                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
531            <#elseif urlIframePortlet?contains('ReinscriptionConservatoire')> 
532                <#local formTitle = "Formulaire de réinscription au conservatoire" /> 
533                <#local formPictoClass = "eservice-form-opener-picto-music" /> 
534            <#elseif urlIframePortlet?contains('ContactUs')> 
535                <#local formTitle = "Contacter l'agglo" /> 
536                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
537            <#elseif urlIframePortlet?contains('JobApplication')> 
538                <#local formTitle = "Postuler à une offre d'emploi" /> 
539                <#local formPictoClass = "eservice-form-opener-picto-job" /> 
540            <#elseif urlIframePortlet?contains('WastebinRepair')> 
541                <#local formTitle = "Demande de nouveau bac ou de réparation" /> 
542                <#local formPictoClass = "eservice-form-opener-picto-wastebin" /> 
543            <#elseif urlIframePortlet?contains('WastewaterConnection')> 
544                <#local formTitle = "Raccorder ou brancher mon installation au réseau d'eaux usées" /> 
545                <#local formPictoClass = "eservice-form-opener-picto-water" /> 
546            <#elseif urlIframePortlet?contains('WastesortingTour')> 
547                <#local formTitle = "Visiter le centre de tri" /> 
548                <#local formPictoClass = "eservice-form-opener-picto-altriane" /> 
549            </#if> 
550             
551            <div class="link-portlet eservice-form-opener" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" tabindex="0"> 
552                <div class="eservice-form-opener-picto ${formPictoClass}"></div> 
553                <p class="eservice-form-opener-text">${formTitle}</p> 
554            </div> 
555             
556        <#else> 
557             
558            <#local portletClass = "link-portlet" /> 
559            <#if urlIframePortlet?contains('19_WAR')> 
560                <#local portletClass = "link-portlet planning-cmd-opener" /> 
561            </#if> 
562            <#local remoteUrl = "/c/portal/layout?p_l_id="+plid+"&p_p_id="+portletId+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive"+queryString /> 
563         
564            <div class="${portletClass}" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" tabindex="0"> 
565                <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
566            </div> 
567         
568        </#if> 
569         
570    </#if> 
571     
572</#macro> 
573 
574 
575<#macro getFlickrMedia urlIframePortlet > 
576    <div class="interior-article-media-flickr" data-embed-flickr='${urlIframePortlet}'></div> 
577</#macro> 
578 
579 
580<#macro getFlickrMediaPopup imgMini urlIframePortlet altText height > 
581    <#local displayedHeight = '' /> 
582    <#if height != ""> 
583        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
584    </#if> 
585    <div class="link-flickr" data-flickr='${urlIframePortlet}' tabindex="0"> 
586        <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${altText}" ${displayedHeight} /> 
587    </div> 
588</#macro> 
589 
590 
591<#macro getGalleryMedia mediaSrc height > 
592 
593</#macro> 
594 
595 
596<#macro getGalleryMediaPopup imgMini mediaSrc altText height > 
597 
598</#macro> 
599 
600 
601<#macro getCarouselMedia media mediaSrc altText height width >  
602     
603    <#local ratioDisplay = "" /> 
604    <#if height != "" && width != "" > 
605        <#local ratio = height?number / width?number * 100 /> 
606        <#local ratioDisplay = 'style="padding-top:' + ratio + '%"' /> 
607    </#if> 
608     
609    <div class="carousel" id="carousel-${carouselNb}" data-carousel="carousel-${carouselNb}" ${ratioDisplay}> 
610         
611        <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> 
612        <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> 
613 
614        <img id="carousel-${carouselNb}-img-0" data-carousel="carousel-${carouselNb}" data-img="0" class="carousel-img carousel-img-displayed" src="/cdalr-new-theme/images/blank.png" data-src="${mediaSrc}" alt="${altText}"> 
615 
616        <#if media.media_more??> 
617            <#list media.media_more.getSiblings() as node> 
618                <img id="carousel-${carouselNb}-img-${node_index+1}" data-carousel="carousel-${carouselNb}" data-img="${node_index+1}" class="carousel-img carousel-img-noDisplay" src="/cdalr-new-theme/images/blank.png" data-src="${node.getData()}" alt="${altText}"> 
619            </#list> 
620        </#if> 
621 
622    </div> 
623 
624</#macro> 
625 
626 
627<#macro getCarouselMediaPopup imgMini media mediaSrc altText height width > 
628    <#local diapos = mediaSrc /> 
629    <#if media.media_more??> 
630        <#list media.media_more.getSiblings() as node> 
631            <#if node_index != 0> 
632                <#local diapos = diapos + "," /> 
633            </#if> 
634            <#local diapos = diapos + node.getData() /> 
635        </#list> 
636    </#if> 
637    <#local displayedHeight = '' /> 
638    <#if height != ""> 
639        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
640    </#if> 
641    <a class="link-diapo popup-img-opener" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" data-diapos="${diapos}"> 
642        <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> /> 
643    </a> 
644</#macro> 
645 
646 
647<#--************************************* 
648**  RELATED CONTENT 
649*************************************--> 
650 
651<#function buildRelatedAssetTypedLists entry info > 
652    <#assign relatedAssetTypedLists = {} /> 
653    <#assign infos = "" /> 
654    <#assign assetLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) /> 
655 
656    <#list assetLinks as assetLink> 
657        <#if assetLink.getEntryId1() == entry.getEntryId() > 
658            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId2()) /> 
659        <#else> 
660            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId1()) /> 
661        </#if> 
662         
663        <#if assetLinkEntry?? && assetLinkEntry.isVisible() > 
664            <#assign linkedAssetRenderer = assetLinkEntry.getAssetRenderer() /> 
665     
666            <#if linkedAssetRenderer.hasViewPermission(permissionChecker) > 
667             
668                <#assign type = assetLinkEntry.getClassName() /> 
669                 
670                <#assign newEntry = [{"assetEntry":assetLinkEntry,"assetLink":assetLink}] /> 
671                <#if relatedAssetTypedLists?keys?seq_contains(type)> 
672                    <#assign relatedAssetTypedList = relatedAssetTypedLists[type] + newEntry /> 
673                <#else> 
674                    <#assign relatedAssetTypedList = newEntry /> 
675                </#if> 
676                <#assign relatedAssetTypedLists = relatedAssetTypedLists + {type : relatedAssetTypedList} /> 
677                <#-- 
678                <#assign infos> 
679                    ${infos} ${type}=${relatedAssetTypedLists[type]?size}  (${newEntry?first.getClassPK()}) <br/> 
680                </#assign> 
681                --> 
682            </#if> 
683        </#if> 
684    </#list> 
685     
686    <#if info == "true"> 
687        <#return infos /> 
688    <#else> 
689        <#return relatedAssetTypedLists /> 
690    </#if> 
691    <#return {} /> 
692</#function> 
693 
694 
695<#macro getCustomRelatedAssets relatedAssetTypedLists> 
696    <#local hasRelatedAssets = "false" /> 
697    <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?size != 0> 
698        <#local hasRelatedAssets = "true" /> 
699    </#if> 
700    <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?size != 0> 
701        <#local hasRelatedAssets = "true" /> 
702    </#if> 
703    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
704        <#local webContentNb = getRelatedWebContentNb(relatedAssetTypedLists[typeJournalArticle]) /> 
705        <#if webContentNb != 0> 
706            <#local hasRelatedAssets = "true" /> 
707        </#if> 
708    </#if> 
709    <#if hasRelatedAssets == "true" > 
710        <aside class="interior-article-moreContent-container"> 
711            <p class="interior-article-moreContent-title">En savoir plus</p> 
712            <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
713                <@getRelatedWebContents assets=relatedAssetTypedLists[typeJournalArticle] /> 
714            </#if> 
715            <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?has_content > 
716                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeBookmarksEntry structure=""/> 
717            </#if> 
718            <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?has_content > 
719                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeDLFileEntry structure="" /> 
720            </#if> 
721        </aside> 
722    </#if> 
723</#macro> 
724 
725 
726<#macro getTypedRelatedAssets relatedAssetTypedLists type structure> 
727    <#if type == typeJournalArticle && structure == "CDA_ZOOM_SUR" > 
728        <@getRelatedZoomSur assets=relatedAssetTypedLists[type] /> 
729    <#elseif type == typeJournalArticle && structure == "CDA_CONTACT_SERVICE" > 
730        <@getRelatedFooterContact assets=relatedAssetTypedLists[type] /> 
731    <#elseif type == typeBookmarksEntry > 
732        <@getRelatedPages assets=relatedAssetTypedLists[type] /> 
733    <#elseif type == typeDLFileEntry > 
734        <@getRelatedDocuments assets=relatedAssetTypedLists[type] /> 
735    </#if> 
736</#macro> 
737 
738 
739<#macro getRelatedZoomSur assets> 
740    <#if assets?size != 0> 
741        <#list assets as assetMap> 
742            <#local asset = assetMap.assetEntry /> 
743            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
744            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
745            <#if strucName == 'CDA_ZOOM_SUR'> 
746                <#local img = getField(article,"back_img")/> 
747                <#local url = getField(article,"url_link")/> 
748                <#local target = "href='"+ url +"'" /> 
749                <#if !isInternalLink(url)> 
750                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
751                </#if> 
752                <div class="article-header-alert"> 
753                    <#if url != ""> 
754                        <a class="inner-link" ${target}> 
755                    </#if> 
756                    <img src="${img}" loading="lazy" alt="${asset.getTitleCurrentValue()}"/> 
757                    <h3 class="article-header-alert-title">${asset.getTitleCurrentValue()}</h3> 
758                    <#if url != ""> 
759                        </a> 
760                    </#if> 
761                </div> 
762            </#if> 
763        </#list> 
764    </#if> 
765</#macro> 
766 
767<#macro getRelatedFooterContact assets> 
768    <#if assets?size == 0> 
769        <@getDefaultFooterContact /> 
770    <#else> 
771        <#local hasContactFooter = false /> 
772        <#list assets as assetMap> 
773            <#local asset = assetMap.assetEntry /> 
774            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
775            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
776            <#if strucName == 'CDA_CONTACT_SERVICE'> 
777                <#local contact_service = getField(article,"Contact_service")/> 
778                <#local adresse = getField(article,"Adresse")/> 
779                <#local cp = getField(article,"CP")/> 
780                <#local ville = getField(article,"Ville")/> 
781                <#local telephone = getField(article,"Telephone")/> 
782                <#if telephone==""> 
783                    <#local telephone = "05 46 30 34 00" /> 
784                </#if> 
785                <#local courriel = getField(article,"Courriel")/> 
786                <#local annuaire = getField(article,"annuaire_link")/> 
787                <#if annuaire==""> 
788                    <#local annuaire = "/annuaire-des-services"/> 
789                </#if> 
790                <a class="interior-content-footer-contact interior-content-footer-service" href="${annuaire}"> 
791                    Contact<br/> 
792                    ${asset.getTitle(locale)} 
793                </a> 
794                <p class="interior-content-footer-contact interior-content-footer-address"> 
795                    <span class="interior-content-footer-contact-inner">${adresse}<br/>${cp} ${ville}</span> 
796                </p> 
797                <p class="interior-content-footer-contact interior-content-footer-phone"> 
798                    <span class="interior-content-footer-contact-inner">${telephone}</span> 
799                </p> 
800                <a class="interior-content-footer-contact interior-content-footer-email" href="mailto:${courriel}?subject=Contact%20site%20Agglo"> 
801                    <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
802                </a> 
803                <a class="interior-content-footer-annuaire" href="${annuaire}"><span class="sr-only">Annuaire des services</span></a> 
804                <#local hasContactFooter = true /> 
805                <#break /> 
806            </#if> 
807        </#list> 
808        <#if hasContactFooter == false> 
809            <@getDefaultFooterContact /> 
810        </#if> 
811    </#if> 
812</#macro> 
813 
814 
815<#macro getDefaultFooterContact > 
816    <a class="interior-content-footer-contact interior-content-footer-service" href="/annuaire-des-services"> 
817        Contact<br/> 
818        Agglo La Rochelle 
819    </a> 
820    <p class="interior-content-footer-contact interior-content-footer-address"> 
821        <span class="interior-content-footer-contact-inner">6, rue Saint-Michel<br/>17000 La Rochelle</span> 
822    </p> 
823    <p class="interior-content-footer-contact interior-content-footer-phone"> 
824        <span class="interior-content-footer-contact-inner">05 46 30 34 00</span> 
825    </p> 
826    <a class="interior-content-footer-contact interior-content-footer-email" href="/contacter-l-agglo"> 
827        <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
828    </a> 
829    <a class="interior-content-footer-annuaire" href="/annuaire-des-services"><span class="sr-only">Annuaire des services</span></a> 
830</#macro> 
831 
832 
833<#function getRelatedWebContentNb assets> 
834    <#local nb = 0 /> 
835    <#if assets?size != 0> 
836        <#local nb = 0 /> 
837        <#list assets as assetMap> 
838            <#local asset = assetMap.assetEntry /> 
839            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
840            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
841            <#if strucName != 'CDA_CONTACT_SERVICE' && strucName != 'CDA_ZOOM_SUR'> 
842                <#local nb = nb + 1 /> 
843            </#if> 
844        </#list> 
845    </#if> 
846    <#return nb /> 
847</#function> 
848 
849 
850<#macro getRelatedWebContents assets> 
851     
852    <#local pagesNb = 0 /> 
853    <#local pages = [] /> 
854     
855    <#if assets?has_content && assets?size != 0> 
856        <#list assets as assetMap> 
857            <#local asset = assetMap.assetEntry /> 
858            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
859            <#local strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
860            <#if strucName == "CDA_ARTICLE_CMS_ENRICHI" || strucName == "CDA_ACTU"> 
861                <#local pagesNb = pagesNb + 1 /> 
862                <#local pages = pages + [assetMap] /> 
863            </#if> 
864        </#list> 
865    </#if> 
866     
867    <#if pagesNb != 0> 
868         
869        <ul> 
870             
871            <#list pages as page> 
872                 
873                <#local asset = page.assetEntry /> 
874                <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
875                <#local strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
876                <#if article.getLayoutUuid()?has_content> 
877                    <#if strucName == "CDA_ARTICLE_CMS_ENRICHI"> 
878                        <#local displayPage = layoutService.getLayoutByUuidAndGroupId(article.getLayoutUuid(),article.getGroupId(), false) /> 
879                        <#local assetPublisherURL = displayPage.getFriendlyURL() + "?article=" + article.getUrlTitle() /> 
880                    <#elseif strucName == "CDA_ACTU"> 
881                        <#local assetPublisherURL = "/-/" + article.getUrlTitle() /> 
882                    </#if> 
883                    <li class="interior-article-moreContent"><a href="${assetPublisherURL}">${article.getTitle(locale)}</a></li> 
884                </#if> 
885                 
886            </#list> 
887             
888        </ul> 
889         
890    </#if> 
891 
892</#macro> 
893 
894 
895<#macro getRelatedPages assets> 
896    <ul> 
897        <#local orderedAssets = getOrderedAssets(assets) /> 
898        <#list orderedAssets?reverse as assetMap> 
899            <#local asset = assetMap.assetEntry /> 
900            <#local assetLink = assetMap.assetLink /> 
901            <#local linkedAssetRenderer = asset.getAssetRenderer() /> 
902            <#local assetLinkEntryTitle = asset.getTitle(locale) /> 
903            <#local assetLinkEntryDescription = asset.getDescription() /> 
904            <#local assetLinkBookmark = bookmarksEntryLocalService.getEntry(asset.getClassPK()) /> 
905            <#local assetURL = assetLinkBookmark.getUrl() /> 
906             
907            <#local target = "" /> 
908            <#if assetURL?contains('widget') || assetURL?contains('iframe') || assetURL?contains('embed') > 
909                <#local target = " data-iframe='true' href='"+ assetURL +"' class='link-iframe'" /> 
910            <#else> 
911                <#local target = "href='"+ assetURL +"'" /> 
912                <#if !isInternalLink(assetURL)> 
913                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
914                </#if> 
915            </#if> 
916 
917            <li class="interior-article-moreContent" data-entry-id="${asset.getEntryId()}"><a ${target} title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}">${assetLinkEntryTitle}</a></li> 
918       </#list> 
919   </ul> 
920</#macro> 
921 
922 
923<#macro getRelatedDocuments assets> 
924     
925    <#assign folderNb = 0 /> 
926    <#local orderedAssets = getOrderedAssets(assets) /> 
927    <#local collapsedFolders = false /> 
928     
929    <#list orderedAssets?reverse as assetMap> 
930     
931        <#local asset = assetMap.assetEntry /> 
932        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
933 
934        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
935        <#local folder = fileEntry.getFolder() /> 
936        <#local folderDescription = folder.getDescription()/> 
937        <#if folderDescription != ""> 
938            <#if documents?size &gt; 5> 
939                <#local collapsedFolders = true /> 
940            </#if> 
941        </#if> 
942    </#list> 
943     
944    <#list orderedAssets?reverse as assetMap> 
945     
946        <#local asset = assetMap.assetEntry /> 
947        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
948 
949        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
950        <#local folder = fileEntry.getFolder() /> 
951        <#local folderDescription = folder.getDescription()/> 
952        <#if folderDescription != ""> 
953            <#if collapsedFolders == true> 
954                <input type="checkbox" class="interior-article-moreContent-checkbox" id="interior-article-moreContent-checkbox-${folderNb}" name="interior-article-moreContent-checkbox-${folderNb}"> 
955                <p class="interior-article-moreContent-title"><label for="interior-article-moreContent-checkbox-${folderNb}">${folderDescription}</label></p> 
956                <#assign folderNb = folderNb + 1 /> 
957            <#else> 
958                <p class="interior-article-moreContent-title">${folderDescription}</p> 
959            </#if> 
960        </#if> 
961         
962        <ul class="interior-article-moreContent-list"> 
963            <#local orderedDocs = getOrderedDocs(documents) /> 
964            <#list orderedDocs?reverse as docEntry> 
965                 
966                <#if !docEntry.isInTrash()> 
967                     
968                    <#local assetDocEntry = assetEntryLocalService.getEntry(docEntry.getGroupId(),docEntry.getUuid()) /> 
969                     
970                    <#if assetDocEntry.getAssetRenderer()??> 
971                     
972                        <#local linkedAssetRenderer = assetDocEntry.getAssetRenderer() /> 
973                         
974                        <#local assetLinkEntryTitle = assetDocEntry.getTitle(locale) /> 
975                        <#local assetLinkEntryDescription = assetDocEntry.getDescription(locale) /> 
976                        <#local extension = docEntry.getLatestFileVersion(true).getExtension() /> 
977                         
978                        <#local assetURL = linkedAssetRenderer.getURLDownload(themeDisplay) /> 
979                         
980                        <#local displaySize = "" /> 
981                        <#local size = docEntry.getLatestFileVersion(true).getSize() /> 
982                        <#if size/1024 < 1024 > 
983                            <#local formatSize = size/1024 /> 
984                            <#local displaySize = formatSize?round?string + " Ko" /> 
985                        <#else> 
986                            <#local formatSize = size/10485.76 /> 
987                            <#local displaySize = (formatSize?round/100)?string + " Mo" /> 
988                        </#if> 
989                         
990                        <#local extensionType = "" /> 
991                        <#switch extension> 
992                            <#case "pdf"> 
993                                <#local extensionType = "link-pdf" /> 
994                                <#break> 
995                            <#case "jpg"> 
996                                <#local extensionType = "link-img" /> 
997                                <#break> 
998                            <#case "png"> 
999                                <#local extensionType = "link-img" /> 
1000                                <#break> 
1001                            <#case "mp4"> 
1002                                <#local extensionType = "link-video" /> 
1003                                <#break> 
1004                            <#case "swf"> 
1005                                <#local extensionType = "link-flash" /> 
1006                                <#break> 
1007                            <#default> 
1008                        </#switch> 
1009                        <#assign dlFileEntry = docEntry.getLatestFileVersion(true)/> 
1010                         
1011                        <#local toDownload = "" /> 
1012                        <#if assetLinkEntryTitle?contains("- téléchargement")> 
1013                            <#local toDownload = "download" /> 
1014                            <#if assetURL?contains("?version")> 
1015                                <#local assetURL = assetURL + "&download=true" /> 
1016                            <#else> 
1017                                <#local assetURL = assetURL + "?download=true" /> 
1018                            </#if> 
1019                        </#if> 
1020                         
1021                        <#local target = " href='"+ assetURL +"'" /> 
1022                         
1023                        <li class="interior-article-moreContent" data-entry-id="${asset.entryId}"> 
1024                            <a ${target} class="extension-${extension} ${extensionType}" title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}" ${toDownload} target="_blank" > 
1025                                ${assetLinkEntryTitle} <span class="interior-article-moreContent-extension">${extension}</span> <span class="interior-article-moreContent-doc-weight">${displaySize}</span> <span class="interior-article-moreContent-aria">Ouvrir dans un nouvel onglet</span> 
1026                            </a> 
1027                        </li> 
1028                         
1029                    </#if> 
1030                     
1031                </#if> 
1032                 
1033            </#list> 
1034        </ul> 
1035         
1036    </#list> 
1037     
1038</#macro> 
1039 
1040 
1041<#function getOrderedAssets assets> 
1042    <#local orderedAssets = [] /> 
1043    <#local assetsWithDate = [] /> 
1044    <#list assets as assetMap> 
1045        <#local asset = assetMap.assetEntry /> 
1046        <#local modifiedDate = asset.getModifiedDate() /> 
1047        <#local assetsWithDate = assetsWithDate + [{'assetMap':assetMap,'modifiedDate':modifiedDate}] /> 
1048    </#list> 
1049    <#list assetsWithDate?sort_by('modifiedDate') as orderedAsset> 
1050        <#local orderedAssets = orderedAssets + [orderedAsset.assetMap] /> 
1051    </#list> 
1052    <#return orderedAssets> 
1053</#function> 
1054 
1055<#function getOrderedDocs docs> 
1056    <#local orderedDocs = [] /> 
1057    <#local docsWithDate = [] /> 
1058    <#list docs as docMap> 
1059        <#local doc = assetEntryLocalService.getEntry(docMap.getGroupId(),docMap.getUuid()) /> 
1060        <#local modifiedDate = doc.getModifiedDate() /> 
1061        <#local docsWithDate = docsWithDate + [{'docMap':docMap,'modifiedDate':modifiedDate}] /> 
1062    </#list> 
1063    <#list docsWithDate?sort_by('modifiedDate') as orderedDoc> 
1064        <#local orderedDocs = orderedDocs + [orderedDoc.docMap] /> 
1065    </#list> 
1066    <#return orderedDocs> 
1067</#function> 
1068 
1069 
1070<#function isInternalLink link> 
1071  <#local internal = link?contains(".agglo-larochelle.fr") || !link?contains("//")> 
1072  <#return internal> 
1073</#function> 
1074 
1075 
1076<#function getField journalArticle fieldName> 
1077    <#local fieldValue = ''/> 
1078     <#local document = saxReaderUtil.read(journalArticle.getContent()) /> 
1079     <#local rootElement = document.getRootElement() /> 
1080     <#if (rootElement?? && rootElement?has_content)> 
1081        <#local xPathSelector =  saxReaderUtil.createXPath("dynamic-element[@name='"+fieldName+"']/dynamic-content") /> 
1082        <#if (validator.isNotNull(xPathSelector))> 
1083        <#local nbNodes = xPathSelector.selectNodes(rootElement)?size /> 
1084        <#if (nbNodes &gt; 0)> 
1085            <#local fieldValue = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
1086        </#if> 
1087     </#if> 
1088     <#return fieldValue /> 
1089     </#if> 
1090</#function>