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 se substituera aux PLU communaux fin 2019.

Retour

Expositions

Une erreur s'est produite en traitant le calibre.
No signature of method getStructure matches the arguments
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<#-- 
11Application display templates can be used to modify the look of a 
12specific application. 
13 
14Please use the left panel to quickly add commonly used variables. 
15Autocomplete is also available and can be invoked by typing "${". 
16--> 
17 
18<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
19<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetLinkLocalService") /> 
20<#assign bookmarksEntryLocalService = serviceLocator.findService("com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService") /> 
21<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
22<#assign journalStructureLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalStructureLocalService") /> 
23<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
24 
25<#assign typeJournalArticle = "com.liferay.portlet.journal.model.JournalArticle" /> 
26<#assign typeBookmarksEntry = "com.liferay.portlet.bookmarks.model.BookmarksEntry" /> 
27<#assign typeDLFileEntry = "com.liferay.portlet.documentlibrary.model.DLFileEntry" /> 
28 
29<#assign journalArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
30<#assign entry = assetEntryLocalService.getEntry(typeJournalArticle, journalArticle.getResourcePrimKey()) /> 
31<#assign relatedAssetTypedLists = buildRelatedAssetTypedLists(entry, "false") /> 
32 
33<#assign pdfViewer = '/fu/js/pdfjs/web/viewer.html?zoom=page-fit&file=' /> 
34 
35<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 
36<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 
37 
38<#-- ARTICLE CONTAINER --> 
39 
40<div class="interior-article-container"> 
41     
42    <article class="interior-article interior-article-displayed"> 
43         
44        <section class="interior-article-mainContent"> 
45             
46            <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
47                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_ZOOM_SUR" /> 
48            </#if> 
49             
50            <h2>${.vars['reserved-article-title'].data}</h2> 
51             
52            <#if Accroche.getData() != ""> 
53                <p class="interior-article-chapo">${Accroche.getData()}</p> 
54            </#if> 
55             
56            <#if Contenu.getSiblings()?has_content> 
57                <#list Contenu.getSiblings() as content> 
58                     
59                    <#assign zoomedParagraph = "" /> 
60                    <#assign isZoomed = content.par_zoom.getData() /> 
61                    <#if isZoomed == "true" > 
62                        <#assign zoomedParagraph = "zoomed-paragraph" /> 
63                    </#if> 
64                     
65                    <#assign floatingMedia = "no-floating-media" /> 
66                    <#assign alignValue = "" /> 
67                    <#assign alignValue = content.Media.alignment.getData() /> 
68                    <#if alignValue == "fLeft" || alignValue == "fRight" > 
69                        <#assign floatingMedia = "floating-media" /> 
70                    <#elseif alignValue == "flexLeft" || alignValue == "flexRight"> 
71                        <#assign floatingMedia = "flex-media" /> 
72                    </#if> 
73                     
74                    <#assign contentTitle = content.content_title.getData() /> 
75                     
76                    <#assign mediaSrc = "" /> 
77                    <#assign urlIframePortlet = "" /> 
78                     
79                    <#if content.Media?? && content.Media?has_content > 
80                        <#assign mediaSrc = content.Media.getData()/> 
81                        <#assign urlIframePortlet = content.Media.url_iframe_portlet.getData() /> 
82                    </#if> 
83                     
84                     
85                    <#if contentTitle!="" || content.getData()!="" || mediaSrc!="" || urlIframePortlet !="" > 
86                         
87                        <div class="interior-article-paragraph ${zoomedParagraph} ${floatingMedia}"> 
88                             
89                            <#if content.anchor?has_content> 
90                                <#assign anchor = content.anchor.getData() /> 
91                                <#if anchor != "" > 
92                                    <a id="${anchor}" class="page-anchor"></a> 
93                                </#if> 
94                            </#if> 
95                             
96                            <#if contentTitle != "" > 
97                                <h3>${contentTitle}</h3> 
98                            </#if> 
99                             
100                            <#if floatingMedia == "no-floating-media" > 
101                             
102                                ${content.getData()?replace("<p></p>","")} 
103                                <#if content.Media?? && content.Media?has_content > 
104                                    <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
105                                </#if> 
106                                 
107                            <#elseif floatingMedia == "floating-media"> 
108                             
109                                <#if content.Media?? && content.Media?has_content > 
110                                    <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
111                                </#if> 
112                                ${content.getData()?replace("<p></p>","")} 
113                                <div class="clear-float"></div> 
114                                 
115                             <#elseif floatingMedia == "flex-media"> 
116                              
117                                <div class="flex-display flex-media-paragraph ${alignValue}"> 
118                                    <#if content.Media?? && content.Media?has_content > 
119                                        <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
120                                    </#if> 
121                                    <div class="flex-media-paragraph-content"> 
122                                        ${content.getData()?replace("<p></p>","")} 
123                                    </div> 
124                                </div> 
125                                 
126                            </#if> 
127                             
128                        </div> 
129                         
130                    </#if> 
131 
132                </#list> 
133            </#if> 
134              
135        </section> 
136         
137        <@getCustomRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists /> 
138         
139    </article> 
140     
141    <footer class="interior-article-footer"> 
142        <ul class="interior-article-footer-items-list"> 
143            <li class="interior-article-footer-item interior-article-profile"><a class="inner-link" href="/tableau-de-bord" title="Gérer mon profil">Mon profil</a></li> 
144        <li class="interior-article-footer-item interior-article-rss"><a class="inner-link" href="/les-flux-rss-de-l-agglo">Les flux RSS de l'agglo</a></li> 
145        <li class="interior-article-footer-item interior-article-print"><button type="button" class="inner-link" title="Imprimer">Imprimer</button></li> 
146        <li class="interior-article-footer-item interior-article-mail"><button type="button" class="inner-link" title="Partager par mail">Partager par mail</button></li> 
147        <li class="interior-article-footer-item interior-article-twitter"><button type="button" class="inner-link" title="Partager sur Twitter">Partager sur Twitter</button></li> 
148        <li class="interior-article-footer-item interior-article-facebook"><button type="button" class="inner-link" title="Partager sur Facebook">Partager sur Facebook</button></li> 
149        </ul> 
150    </footer> 
151     
152</div> 
153 
154<#-- FOOTER CONTACT --> 
155 
156<footer class="interior-content-footer interior-content-footer-displayed"> 
157     
158    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
159        <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_CONTACT_SERVICE" /> 
160    <#else> 
161        <@getDefaultFooterContact /> 
162    </#if> 
163 
164</footer> 
165 
166 
167<#--************************************* 
168** MEDIA DISPLAY 
169*************************************--> 
170 
171<#macro getMedia media urlIframePortlet> 
172     
173    <#local mediaSrc = media.getData()/> 
174     
175    <#if mediaSrc != '' || urlIframePortlet != ''> 
176         
177        <#local mediaType = media.media_type.getData() /> 
178        <#local width = media.width.getData() /> 
179        <#local width = media.width.getData() /> 
180        <#if width == 'null'> 
181            <#local width = '' /> 
182        </#if> 
183        <#if width != ""> 
184            <#local width = 'style="width:'+width+'px;"' /> 
185        </#if> 
186        <#local height = media.height.getData() /> 
187        <#if height == 'null'> 
188            <#local height = '' /> 
189        </#if> 
190        <#local displayMode = media.display_mode.getData() /> 
191        <#local imgMini = media.img_mini.getData() /> 
192        <#local alignment = media.alignment.getData() /> 
193        <#local legend = media.legend.getData() /> 
194        <#local altText = media.alt_text.getData() /> 
195        <#if altText == 'null'> 
196            <#local altText = '' /> 
197        </#if> 
198         
199        <figure class="interior-article-media interior-article-media-${alignment}" ${width}> 
200             
201            <#switch mediaType> 
202                <#case "image"> 
203                    <#if displayMode == "normal"> 
204                       <@getImageMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet altText=altText height=height /> 
205                    <#elseif displayMode == "popup"> 
206                        <@getImageMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
207                    </#if> 
208                    <#break > 
209                <#case "video"> 
210                    <#if displayMode == "normal"> 
211                       <@getVideoMedia imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
212                    <#elseif displayMode == "popup"> 
213                        <@getVideoMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
214                    </#if> 
215                    <#break > 
216                <#case "pdf"> 
217                    <#if displayMode == "normal"> 
218                       <@getPdfMedia mediaSrc=mediaSrc height=height /> 
219                    <#elseif displayMode == "popup"> 
220                        <@getPdfMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
221                    </#if> 
222                    <#break > 
223                <#case "iframe"> 
224                    <#if displayMode == "normal"> 
225                       <@getIframeMedia urlIframePortlet=urlIframePortlet height=height /> 
226                    <#elseif displayMode == "popup"> 
227                        <@getIframeMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
228                    </#if> 
229                    <#break > 
230                <#case "svg"> 
231                    <#if displayMode == "normal"> 
232                       <@getSvgMedia mediaSrc=mediaSrc height=height /> 
233                    <#elseif displayMode == "popup"> 
234                        <@getSvgMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
235                    </#if> 
236                    <#break > 
237                <#case "flash"> 
238                    <#if displayMode == "normal"> 
239                       <@getFlashMedia mediaSrc=mediaSrc height=height /> 
240                    <#elseif displayMode == "popup"> 
241                        <@getFlashMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
242                    </#if> 
243                    <#break > 
244                <#case "portlet"> 
245                    <#if displayMode == "normal"> 
246                       <@getPortletMedia urlIframePortlet=urlIframePortlet height=height /> 
247                    <#elseif displayMode == "popup"> 
248                        <@getPortletMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
249                    </#if> 
250                    <#break > 
251                <#case "flickr"> 
252                    <#if displayMode == "normal"> 
253                       <@getFlickrMedia urlIframePortlet=urlIframePortlet /> 
254                    <#elseif displayMode == "popup"> 
255                        <@getFlickrMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
256                    </#if> 
257                    <#break > 
258                <#case "gallery"> 
259                    <#if displayMode == "normal"> 
260                       <@getGalleryMedia mediaSrc=mediaSrc height=height /> 
261                    <#elseif displayMode == "popup"> 
262                        <@getGalleryMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
263                    </#if> 
264                    <#break > 
265                <#case "carousel"> 
266                    <#if displayMode == "normal"> 
267                       <@getCarouselMedia mediaSrc=mediaSrc height=height /> 
268                    <#elseif displayMode == "popup"> 
269                        <@getCarouselMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
270                    </#if> 
271                    <#break > 
272                <#default> 
273            </#switch> 
274             
275            <#local hasLegend = legend?length != 0 /> 
276            <#if hasLegend> 
277                <figcaption class="interior-article-media-legend">${legend}</figcaption> 
278            </#if> 
279             
280        </figure> 
281         
282    </#if> 
283     
284</#macro> 
285 
286 
287<#macro getImageMedia mediaSrc urlIframePortlet altText height > 
288    <#local displayedHeight = '' /> 
289    <#if height != ""> 
290        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
291    </#if> 
292    <#if urlIframePortlet != ""> 
293        <#assign target = "href='"+ urlIframePortlet +"'" /> 
294        <#if !isInternalLink(urlIframePortlet)> 
295            <#assign target = target + " target='_blank' rel='noopener noreferrer'" /> 
296        </#if> 
297        <a ${target}> 
298    </#if> 
299    <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${mediaSrc}" alt="${altText}" ${displayedHeight} /> 
300    <#if urlIframePortlet != ""> 
301        </a> 
302    </#if> 
303</#macro> 
304 
305 
306<#macro getImageMediaPopup imgMini mediaSrc altText height > 
307    <#local displayedHeight = '' /> 
308    <#if height != ""> 
309        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
310    </#if> 
311    <a class="link-img" href="${mediaSrc}" title="${altText}"> 
312        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
313    </a> 
314</#macro> 
315 
316 
317<#macro getVideoMedia imgMini mediaSrc height altText> 
318    <div class="lazy-video" data-video="${mediaSrc}" data-height="${height}" data-text="${htmlUtil.escapeAttribute(altText)}" data-poster="${imgMini}" ></div> 
319</#macro> 
320 
321 
322<#macro getVideoMediaPopup imgMini mediaSrc altText height > 
323    <#local displayedHeight = '' /> 
324    <#if height != ""> 
325        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
326    </#if> 
327    <a class="link-video" href="${mediaSrc}" title="${altText}"> 
328        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} /> 
329    </a> 
330</#macro> 
331 
332 
333<#macro getPdfMedia mediaSrc height > 
334    <#local displayedHeight = '' /> 
335    <#if height != ""> 
336        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
337    </#if> 
338    <iframe class="interior-article-media-iframe" data-src="${pdfViewer+mediaSrc}" ${displayedHeight} allowfullscreen ></iframe> 
339</#macro> 
340 
341 
342<#macro getPdfMedia mediaSrc height > 
343    <#local displayedHeight = '' /> 
344    <#if height != ""> 
345        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
346    </#if> 
347    <iframe class="interior-article-media-iframe" src="${pdfViewer+mediaSrc}" ${displayedHeight} allowfullscreen></iframe>     
348</#macro> 
349 
350 
351<#macro getPdfMediaPopup imgMini mediaSrc altText height > 
352    <#local displayedHeight = '' /> 
353    <#if height != ""> 
354        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
355    </#if> 
356    <a class="link-pdf" href="${mediaSrc}"> 
357        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
358    </a> 
359</#macro> 
360 
361 
362<#macro getIframeMedia urlIframePortlet height > 
363    <#local displayedHeight = '' /> 
364    <#if height != ""> 
365        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
366    </#if> 
367    <iframe class="interior-article-media-iframe" src="${urlIframePortlet}" ${displayedHeight} allowfullscreen></iframe> 
368</#macro> 
369 
370 
371<#macro getIframeMediaPopup imgMini urlIframePortlet altText height > 
372    <#local displayedHeight = '' /> 
373    <#if height != ""> 
374        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
375    </#if> 
376    <a class="link-iframe" href="${urlIframePortlet}"> 
377        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
378    </a> 
379</#macro> 
380 
381 
382<#macro getSvgMedia mediaSrc height > 
383 
384</#macro> 
385 
386 
387<#macro getSvgMediaPopup imgMini mediaSrc altText height > 
388 
389</#macro> 
390 
391 
392<#macro getFlashMedia mediaSrc height > 
393    <#local displayedHeight = '' /> 
394    <#if height != ""> 
395        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
396    </#if> 
397    <object class="interior-article-media-object" type="application/x-shockwave-flash"  data="${mediaSrc}" ${displayedHeight}></object>  
398</#macro> 
399 
400 
401<#macro getFlashMediaPopup imgMini mediaSrc altText height > 
402    <#local displayedHeight = '' /> 
403    <#if height != ""> 
404        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
405    </#if> 
406    <a class="link-flash" href="${mediaSrc}"> 
407        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
408    </a> 
409</#macro> 
410 
411 
412<#macro getPortletMedia urlIframePortlet height > 
413     
414    <#local displayedHeight = '' /> 
415    <#if height != ""> 
416        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
417    </#if> 
418     
419    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
420    <#local hasQueryString = urlIframePortlet?contains('?') /> 
421    <#local portletId = urlIframePortlet /> 
422    <#local queryString = '' /> 
423     
424    <#if hasInstanceId> 
425        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
426    </#if> 
427    <#if hasQueryString> 
428        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
429        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
430    </#if> 
431     
432    <#local divId = "embedded-portlet-" + portletId /> 
433    <#local plid = themeDisplay.plid /> 
434     
435    <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') || urlIframePortlet?contains('cuCreate')> 
436        <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
437     
438        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" ${displayedHeight}></div> 
439         
440    <#else> 
441         
442        <#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 /> 
443         
444        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" ${displayedHeight}></div> 
445         
446    </#if> 
447     
448</#macro> 
449 
450 
451<#macro getPortletMediaPopup imgMini urlIframePortlet altText height > 
452       
453    <#local divId = "embedded-portlet-" + urlIframePortlet /> 
454     
455    <#local displayedHeight = '' /> 
456    <#if height != ""> 
457        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
458    </#if> 
459     
460    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
461    <#local hasQueryString = urlIframePortlet?contains('?') /> 
462    <#local portletId = urlIframePortlet /> 
463    <#local queryString = '' /> 
464 
465    <#if hasInstanceId> 
466        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
467    </#if> 
468    <#if hasQueryString> 
469        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
470        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
471    </#if> 
472     
473    <#if themeDisplay?? && themeDisplay.plid?? > 
474         
475        <#local plid = themeDisplay.plid /> 
476         
477        <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') > 
478            <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
479      
480            <#local formTitle = "" /> 
481            <#local formPictoClass = "" /> 
482            <#if urlIframePortlet?contains('FiberOpticalConnectionRequest')> 
483                <#local formTitle = "Demande d'information pour le raccordement à la fibre optique" /> 
484                <#local formPictoClass = "eservice-form-opener-picto-fiber" /> 
485            <#elseif urlIframePortlet?contains('AntContact')> 
486                <#local formTitle = "Contacter l'aménagement numérique du territoire" /> 
487                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
488            <#elseif urlIframePortlet?contains('ReinscriptionConservatoire')> 
489                <#local formTitle = "Formulaire de réinscription au conservatoire" /> 
490                <#local formPictoClass = "eservice-form-opener-picto-music" /> 
491            <#elseif urlIframePortlet?contains('ContactUs')> 
492                <#local formTitle = "Contacter l'agglo" /> 
493                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
494            <#elseif urlIframePortlet?contains('JobApplication')> 
495                <#local formTitle = "Postuler à une offre d'emploi" /> 
496                <#local formPictoClass = "eservice-form-opener-picto-job" /> 
497            <#elseif urlIframePortlet?contains('WastebinRepair')> 
498                <#local formTitle = "Demande de nouveau bac ou de réparation" /> 
499                <#local formPictoClass = "eservice-form-opener-picto-wastebin" /> 
500            <#elseif urlIframePortlet?contains('WastewaterConnection')> 
501                <#local formTitle = "Raccorder ou brancher mon installation au réseau d'eaux usées" /> 
502                <#local formPictoClass = "eservice-form-opener-picto-water" /> 
503            <#elseif urlIframePortlet?contains('WastesortingTour')> 
504                <#local formTitle = "Visiter le centre de tri" /> 
505                <#local formPictoClass = "eservice-form-opener-picto-altriane" /> 
506            </#if> 
507             
508            <div class="link-portlet eservice-form-opener" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" tabindex="0"> 
509                <div class="eservice-form-opener-picto ${formPictoClass}"></div> 
510                <p class="eservice-form-opener-text">${formTitle}</p> 
511            </div> 
512             
513        <#else> 
514             
515            <#local portletClass = "link-portlet" /> 
516            <#if urlIframePortlet?contains('19_WAR')> 
517                <#local portletClass = "link-portlet planning-cmd-opener" /> 
518            </#if> 
519            <#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 /> 
520         
521            <div class="${portletClass}" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" tabindex="0"> 
522                <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
523            </div> 
524         
525        </#if> 
526         
527    </#if> 
528     
529</#macro> 
530 
531 
532<#macro getFlickrMedia urlIframePortlet > 
533    <div class="interior-article-media-flickr" data-embed-flickr='${urlIframePortlet}'></div> 
534</#macro> 
535 
536 
537<#macro getFlickrMediaPopup imgMini urlIframePortlet altText height > 
538    <#local displayedHeight = '' /> 
539    <#if height != ""> 
540        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
541    </#if> 
542    <div class="link-flickr" data-flickr='${urlIframePortlet}' tabindex="0"> 
543        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
544    </div> 
545</#macro> 
546 
547 
548<#macro getGalleryMedia mediaSrc height > 
549 
550</#macro> 
551 
552 
553<#macro getGalleryMediaPopup imgMini mediaSrc altText height > 
554 
555</#macro> 
556 
557 
558<#macro getCarouselMedia mediaSrc height > 
559 
560</#macro> 
561 
562 
563<#macro getCarouselMediaPopup imgMini mediaSrc altText height > 
564 
565</#macro> 
566 
567 
568<#--************************************* 
569**  RELATED CONTENT 
570*************************************--> 
571 
572<#function buildRelatedAssetTypedLists entry info > 
573    <#assign relatedAssetTypedLists = {} /> 
574    <#assign infos = "" /> 
575    <#assign assetLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) /> 
576 
577    <#list assetLinks as assetLink> 
578        <#if assetLink.getEntryId1() == entry.getEntryId() > 
579            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId2()) /> 
580        <#else> 
581            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId1()) /> 
582        </#if> 
583         
584        <#if assetLinkEntry?? && assetLinkEntry.isVisible() > 
585            <#assign linkedAssetRenderer = assetLinkEntry.getAssetRenderer() /> 
586     
587            <#if linkedAssetRenderer.hasViewPermission(permissionChecker) > 
588             
589                <#assign type = assetLinkEntry.getClassName() /> 
590                 
591                <#assign newEntry = [{"assetEntry":assetLinkEntry,"assetLink":assetLink}] /> 
592                <#if relatedAssetTypedLists?keys?seq_contains(type)> 
593                    <#assign relatedAssetTypedList = relatedAssetTypedLists[type] + newEntry /> 
594                <#else> 
595                    <#assign relatedAssetTypedList = newEntry /> 
596                </#if> 
597                <#assign relatedAssetTypedLists = relatedAssetTypedLists + {type : relatedAssetTypedList} /> 
598                <#-- 
599                <#assign infos> 
600                    ${infos} ${type}=${relatedAssetTypedLists[type]?size}  (${newEntry?first.getClassPK()}) <br/> 
601                </#assign> 
602                --> 
603            </#if> 
604        </#if> 
605    </#list> 
606     
607    <#if info == "true"> 
608        <#return infos /> 
609    <#else> 
610        <#return relatedAssetTypedLists /> 
611    </#if> 
612    <#return {} /> 
613</#function> 
614 
615 
616<#macro getCustomRelatedAssets relatedAssetTypedLists> 
617    <#local hasRelatedAssets = "false" /> 
618    <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?size != 0> 
619        <#local hasRelatedAssets = "true" /> 
620    </#if> 
621    <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?size != 0> 
622        <#local hasRelatedAssets = "true" /> 
623    </#if> 
624    <#-- 
625    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
626        <#local webContentNb = getRelatedWebContentNb(relatedAssetTypedLists[typeJournalArticle]) /> 
627        <#if webContentNb != 0> 
628            <#local hasRelatedAssets = "true" /> 
629        </#if> 
630    </#if> 
631    --> 
632    <#if hasRelatedAssets == "true" > 
633        <aside class="interior-article-moreContent-container"> 
634            <p class="interior-article-moreContent-title">En savoir plus</p> 
635            <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?has_content > 
636                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeBookmarksEntry structure=""/> 
637            </#if> 
638            <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?has_content > 
639                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeDLFileEntry structure="" /> 
640            </#if> 
641        </aside> 
642    </#if> 
643</#macro> 
644 
645 
646<#macro getTypedRelatedAssets relatedAssetTypedLists type structure> 
647    <#if type == typeJournalArticle && structure == "CDA_ZOOM_SUR" > 
648        <@getRelatedZoomSur assets=relatedAssetTypedLists[type] /> 
649    <#elseif type == typeJournalArticle && structure == "CDA_CONTACT_SERVICE" > 
650        <@getRelatedFooterContact assets=relatedAssetTypedLists[type] /> 
651    <#elseif type == typeBookmarksEntry > 
652        <@getRelatedPages assets=relatedAssetTypedLists[type] /> 
653    <#elseif type == typeDLFileEntry > 
654        <@getRelatedDocuments assets=relatedAssetTypedLists[type] /> 
655    </#if> 
656</#macro> 
657 
658 
659<#macro getRelatedZoomSur assets> 
660    <#if assets?size != 0> 
661        <#list assets as assetMap> 
662            <#local asset = assetMap.assetEntry /> 
663            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
664            <#local strucName = journalStructureLocalService.getStructure(article.getGroupId(), jaClassNameId, article.getStructureId(), true).getName(locale) /> 
665            <#if strucName == 'CDA_ZOOM_SUR'> 
666                <#local img = getField(article,"back_img")/> 
667                <#local url = getField(article,"url_link")/> 
668                <#local target = "href='"+ url +"'" /> 
669                <#if !isInternalLink(url)> 
670                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
671                </#if> 
672                <div class="article-header-alert"> 
673                    <#if url != ""> 
674                        <a class="inner-link" ${target}> 
675                    </#if> 
676                    <img src="${img}" alt="${asset.getTitleCurrentValue()}"/> 
677                    <h3 class="article-header-alert-title">${asset.getTitleCurrentValue()}</h3> 
678                    <#if url != ""> 
679                        </a> 
680                    </#if> 
681                </div> 
682            </#if> 
683        </#list> 
684    </#if> 
685</#macro> 
686 
687<#macro getRelatedFooterContact assets> 
688    <#if assets?size == 0> 
689        <@getDefaultFooterContact /> 
690    <#else> 
691        <#local hasContactFooter = false /> 
692    	<#list assets as assetMap> 
693            <#local asset = assetMap.assetEntry /> 
694            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
695            <#local strucName = journalStructureLocalService.getStructure(article.getGroupId(), jaClassNameId, article.getStructureId(), true).getName(locale) /> 
696            <#if strucName == 'CDA_CONTACT_SERVICE'> 
697                <#local contact_service = getField(article,"Contact_service")/> 
698                <#local adresse = getField(article,"Adresse")/> 
699                <#local cp = getField(article,"CP")/> 
700                <#local ville = getField(article,"Ville")/> 
701                <#local telephone = getField(article,"Telephone")/> 
702                <#if telephone==""> 
703                    <#local telephone = "05 46 30 34 00" /> 
704                </#if> 
705                <#local courriel = getField(article,"Courriel")/> 
706                <#local annuaire = getField(article,"annuaire_link")/> 
707                <#if annuaire==""> 
708                    <#local annuaire = "/annuaire-des-services"/> 
709                </#if> 
710                <a class="interior-content-footer-contact interior-content-footer-service" href="${annuaire}"> 
711                    Contact<br/> 
712                    ${asset.getTitle(locale)} 
713                </a> 
714                <p class="interior-content-footer-contact interior-content-footer-address"> 
715                    <span class="interior-content-footer-contact-inner">${adresse}<br/>${cp} ${ville}</span> 
716                </p> 
717                <p class="interior-content-footer-contact interior-content-footer-phone"> 
718                    <span class="interior-content-footer-contact-inner">${telephone}</span> 
719                </p> 
720                <a class="interior-content-footer-contact interior-content-footer-email" href="mailto:${courriel}?subject=Contact%20site%20Agglo"> 
721                    <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
722                </a> 
723                <a class="interior-content-footer-annuaire" href="${annuaire}">Annuaire des services</a> 
724                <#local hasContactFooter = true /> 
725                <#break /> 
726            </#if> 
727        </#list> 
728        <#if hasContactFooter == false> 
729            <@getDefaultFooterContact /> 
730        </#if> 
731	</#if> 
732</#macro> 
733 
734 
735<#macro getDefaultFooterContact > 
736    <a class="interior-content-footer-contact interior-content-footer-service" href="/annuaire-des-services"> 
737        Contact<br/> 
738        Agglo La Rochelle 
739    </a> 
740    <p class="interior-content-footer-contact interior-content-footer-address"> 
741        <span class="interior-content-footer-contact-inner">6, rue Saint-Michel<br/>17000 La Rochelle</span> 
742    </p> 
743    <p class="interior-content-footer-contact interior-content-footer-phone"> 
744        <span class="interior-content-footer-contact-inner">05 46 30 34 00</span> 
745    </p> 
746    <a class="interior-content-footer-contact interior-content-footer-email" href="/contacter-l-agglo"> 
747        <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
748    </a> 
749    <a class="interior-content-footer-annuaire" href="/annuaire-des-services">Annuaire des services</a> 
750</#macro> 
751 
752 
753<#function getRelatedWebContentNb assets> 
754    <#local nb = 0 /> 
755    <#if assets?size != 0> 
756        <#local nb = 0 /> 
757        <#list assets as assetMap> 
758            <#local asset = assetMap.assetEntry /> 
759            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
760            <#local strucName = journalStructureLocalService.getStructure(article.getGroupId(), jaClassNameId, article.getStructureId(), true).getName(locale) /> 
761            <#if strucName != 'CDA_CONTACT_SERVICE' && strucName != 'CDA_ZOOM_SUR'> 
762                <#local nb = nb + 1 /> 
763            </#if> 
764        </#list> 
765    </#if> 
766    <#return nb /> 
767</#function> 
768 
769 
770<#macro getRelatedPages assets> 
771    <ul> 
772        <#local orderedAssets = getOrderedAssets(assets) /> 
773        <#list orderedAssets?reverse as assetMap> 
774            <#local asset = assetMap.assetEntry /> 
775            <#local assetLink = assetMap.assetLink /> 
776            <#local linkedAssetRenderer = asset.getAssetRenderer() /> 
777            <#local assetLinkEntryTitle = asset.getTitle(locale) /> 
778            <#local assetLinkEntryDescription = asset.getDescription() /> 
779            <#local assetLinkBookmark = bookmarksEntryLocalService.getEntry(asset.getClassPK()) /> 
780            <#local assetURL = assetLinkBookmark.getUrl() /> 
781             
782            <#local target = "" /> 
783            <#if assetURL?contains('widget') || assetURL?contains('iframe') || assetURL?contains('embed') > 
784                <#local target = " data-iframe='true' href='"+ assetURL +"' class='link-iframe'" /> 
785            <#else> 
786                <#local target = "href='"+ assetURL +"'" /> 
787                <#if !isInternalLink(assetURL)> 
788                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
789                </#if> 
790            </#if> 
791 
792            <li class="interior-article-moreContent" data-entry-id="${asset.getEntryId()}"><a ${target} title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}">${assetLinkEntryTitle}</a></li> 
793       </#list> 
794   </ul> 
795</#macro> 
796 
797 
798<#macro getRelatedDocuments assets> 
799     
800    <#assign folderNb = 0 /> 
801    <#local orderedAssets = getOrderedAssets(assets) /> 
802    <#local collapsedFolders = false /> 
803     
804    <#list orderedAssets?reverse as assetMap> 
805     
806        <#local asset = assetMap.assetEntry /> 
807        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
808 
809        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
810        <#local folder = fileEntry.getFolder() /> 
811        <#local folderDescription = folder.getDescription()/> 
812        <#if folderDescription != ""> 
813            <#if documents?size &gt; 5> 
814                <#local collapsedFolders = true /> 
815            </#if> 
816        </#if> 
817    </#list> 
818     
819    <#list orderedAssets?reverse as assetMap> 
820     
821        <#local asset = assetMap.assetEntry /> 
822        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
823 
824        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
825        <#local folder = fileEntry.getFolder() /> 
826        <#local folderDescription = folder.getDescription()/> 
827        <#if folderDescription != ""> 
828            <#if collapsedFolders == true> 
829                <input type="checkbox" class="interior-article-moreContent-checkbox" id="interior-article-moreContent-checkbox-${folderNb}" name="interior-article-moreContent-checkbox-${folderNb}"> 
830                <p class="interior-article-moreContent-title"><label for="interior-article-moreContent-checkbox-${folderNb}">${folderDescription}</label></p> 
831                <#assign folderNb = folderNb + 1 /> 
832            <#else> 
833                <p class="interior-article-moreContent-title">${folderDescription}</p> 
834            </#if> 
835        </#if> 
836         
837        <ul class="interior-article-moreContent-list"> 
838            <#local orderedDocs = getOrderedDocs(documents) /> 
839            <#list orderedDocs?reverse as docEntry> 
840                 
841                <#if !docEntry.isInTrash()> 
842                     
843                    <#local assetDocEntry = assetEntryLocalService.getEntry(docEntry.getGroupId(),docEntry.getUuid()) /> 
844                     
845                    <#if assetDocEntry.getAssetRenderer()??> 
846                     
847                        <#local linkedAssetRenderer = assetDocEntry.getAssetRenderer() /> 
848                         
849                        <#local assetLinkEntryTitle = assetDocEntry.getTitle(locale) /> 
850                        <#local assetLinkEntryDescription = assetDocEntry.getDescription(locale) /> 
851                        <#local extension = docEntry.getLatestFileVersion(true).getExtension() /> 
852                         
853                        <#local assetURL = linkedAssetRenderer.getURLDownload(themeDisplay) /> 
854                         
855                        <#local extensionType = "" /> 
856                        <#switch extension> 
857                            <#case "pdf"> 
858                                <#local extensionType = "link-pdf" /> 
859                                <#break> 
860                            <#case "jpg"> 
861                                <#local extensionType = "link-img" /> 
862                                <#break> 
863                            <#case "png"> 
864                                <#local extensionType = "link-img" /> 
865                                <#break> 
866                            <#case "mp4"> 
867                                <#local extensionType = "link-video" /> 
868                                <#break> 
869                            <#case "swf"> 
870                                <#local extensionType = "link-flash" /> 
871                                <#break> 
872                            <#default> 
873                        </#switch> 
874                        <#assign dlFileEntry = docEntry.getLatestFileVersion(true)/> 
875                         
876                        <#local toDownload = "" /> 
877                        <#if assetLinkEntryTitle?contains("- téléchargement")> 
878                            <#local toDownload = "download" /> 
879                            <#if assetURL?contains("?version")> 
880                                <#local assetURL = assetURL + "&download=true" /> 
881                            <#else> 
882                                <#local assetURL = assetURL + "?download=true" /> 
883                            </#if> 
884                        </#if> 
885                         
886                        <#local target = " href='"+ assetURL +"'" /> 
887                         
888                        <li class="interior-article-moreContent" data-entry-id="${asset.entryId}"> 
889                           <a ${target} class="extension-${extension} ${extensionType}" title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}" ${toDownload} > 
890                                ${assetLinkEntryTitle} <span class="interior-article-moreContent-extension">${extension}</span> 
891                            </a>  
892                        </li> 
893                         
894                    </#if> 
895                     
896                </#if> 
897                 
898            </#list> 
899        </ul> 
900         
901    </#list> 
902     
903</#macro> 
904 
905 
906<#function getOrderedAssets assets> 
907    <#local orderedAssets = [] /> 
908    <#local assetsWithDate = [] /> 
909    <#list assets as assetMap> 
910        <#local asset = assetMap.assetEntry /> 
911        <#local modifiedDate = asset.getModifiedDate() /> 
912        <#local assetsWithDate = assetsWithDate + [{'assetMap':assetMap,'modifiedDate':modifiedDate}] /> 
913    </#list> 
914    <#list assetsWithDate?sort_by('modifiedDate') as orderedAsset> 
915        <#local orderedAssets = orderedAssets + [orderedAsset.assetMap] /> 
916    </#list> 
917    <#return orderedAssets> 
918</#function> 
919 
920<#function getOrderedDocs docs> 
921    <#local orderedDocs = [] /> 
922    <#local docsWithDate = [] /> 
923    <#list docs as docMap> 
924        <#local doc = assetEntryLocalService.getEntry(docMap.getGroupId(),docMap.getUuid()) /> 
925        <#local modifiedDate = doc.getModifiedDate() /> 
926        <#local docsWithDate = docsWithDate + [{'docMap':docMap,'modifiedDate':modifiedDate}] /> 
927    </#list> 
928    <#list docsWithDate?sort_by('modifiedDate') as orderedDoc> 
929        <#local orderedDocs = orderedDocs + [orderedDoc.docMap] /> 
930    </#list> 
931    <#return orderedDocs> 
932</#function> 
933 
934 
935<#function isInternalLink link> 
936  <#local internal = link?contains("www.agglo-larochelle.fr") || link?contains("www2.agglo-larochelle.fr") || link?contains("www-new.agglo-larochelle.fr") || !link?contains("//")> 
937  <#return internal> 
938</#function> 
939 
940 
941<#function getField journalArticle fieldName> 
942    <#local fieldValue = ''/> 
943     <#local document = saxReaderUtil.read(journalArticle.getContent()) /> 
944     <#local rootElement = document.getRootElement() /> 
945     <#if (rootElement?? && rootElement?has_content)> 
946        <#local xPathSelector =  saxReaderUtil.createXPath("dynamic-element[@name='"+fieldName+"']/dynamic-content") /> 
947        <#if (validator.isNotNull(xPathSelector))> 
948        <#local nbNodes = xPathSelector.selectNodes(rootElement)?size /> 
949        <#if (nbNodes &gt; 0)> 
950            <#local fieldValue = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
951        </#if> 
952     </#if> 
953     <#return fieldValue /> 
954     </#if> 
955</#function> 
956<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetLinkLocalService") /> 
957<#assign bookmarksEntryLocalService = serviceLocator.findService("com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService") /> 
958<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
959<#assign journalStructureLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalStructureLocalService") /> 
960<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
961 
962<#assign typeJournalArticle = "com.liferay.portlet.journal.model.JournalArticle" /> 
963<#assign typeBookmarksEntry = "com.liferay.portlet.bookmarks.model.BookmarksEntry" /> 
964<#assign typeDLFileEntry = "com.liferay.portlet.documentlibrary.model.DLFileEntry" /> 
965 
966<#assign journalArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
967<#assign entry = assetEntryLocalService.getEntry(typeJournalArticle, journalArticle.getResourcePrimKey()) /> 
968<#assign relatedAssetTypedLists = buildRelatedAssetTypedLists(entry, "false") /> 
969 
970<#assign pdfViewer = '/fu/js/pdfjs/web/viewer.html?zoom=page-fit&file=' /> 
971 
972<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 
973<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 
974 
975<#-- ARTICLE CONTAINER --> 
976 
977<div class="interior-article-container"> 
978     
979    <article class="interior-article interior-article-displayed"> 
980         
981        <section class="interior-article-mainContent"> 
982             
983            <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
984                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_ZOOM_SUR" /> 
985            </#if> 
986             
987            <h2>${.vars['reserved-article-title'].data}</h2> 
988             
989            <#if Accroche.getData() != ""> 
990                <p class="interior-article-chapo">${Accroche.getData()}</p> 
991            </#if> 
992             
993            <#if Contenu.getSiblings()?has_content> 
994                <#list Contenu.getSiblings() as content> 
995                     
996                    <#assign zoomedParagraph = "" /> 
997                    <#assign isZoomed = content.par_zoom.getData() /> 
998                    <#if isZoomed == "true" > 
999                        <#assign zoomedParagraph = "zoomed-paragraph" /> 
1000                    </#if> 
1001                     
1002                    <#assign floatingMedia = "no-floating-media" /> 
1003                    <#assign alignValue = "" /> 
1004                    <#assign alignValue = content.Media.alignment.getData() /> 
1005                    <#if alignValue == "fLeft" || alignValue == "fRight" > 
1006                        <#assign floatingMedia = "floating-media" /> 
1007                    <#elseif alignValue == "flexLeft" || alignValue == "flexRight"> 
1008                        <#assign floatingMedia = "flex-media" /> 
1009                    </#if> 
1010                     
1011                    <#assign contentTitle = content.content_title.getData() /> 
1012                     
1013                    <#assign mediaSrc = "" /> 
1014                    <#assign urlIframePortlet = "" /> 
1015                     
1016                    <#if content.Media?? && content.Media?has_content > 
1017                        <#assign mediaSrc = content.Media.getData()/> 
1018                        <#assign urlIframePortlet = content.Media.url_iframe_portlet.getData() /> 
1019                    </#if> 
1020                     
1021                     
1022                    <#if contentTitle!="" || content.getData()!="" || mediaSrc!="" || urlIframePortlet !="" > 
1023                         
1024                        <div class="interior-article-paragraph ${zoomedParagraph} ${floatingMedia}"> 
1025                             
1026                            <#if content.anchor?has_content> 
1027                                <#assign anchor = content.anchor.getData() /> 
1028                                <#if anchor != "" > 
1029                                    <a id="${anchor}" class="page-anchor"></a> 
1030                                </#if> 
1031                            </#if> 
1032                             
1033                            <#if contentTitle != "" > 
1034                                <h3>${contentTitle}</h3> 
1035                            </#if> 
1036                             
1037                            <#if floatingMedia == "no-floating-media" > 
1038                             
1039                                ${content.getData()?replace("<p></p>","")} 
1040                                <#if content.Media?? && content.Media?has_content > 
1041                                    <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
1042                                </#if> 
1043                                 
1044                            <#elseif floatingMedia == "floating-media"> 
1045                             
1046                                <#if content.Media?? && content.Media?has_content > 
1047                                    <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
1048                                </#if> 
1049                                ${content.getData()?replace("<p></p>","")} 
1050                                <div class="clear-float"></div> 
1051                                 
1052                             <#elseif floatingMedia == "flex-media"> 
1053                              
1054                                <div class="flex-display flex-media-paragraph ${alignValue}"> 
1055                                    <#if content.Media?? && content.Media?has_content > 
1056                                        <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
1057                                    </#if> 
1058                                    <div class="flex-media-paragraph-content"> 
1059                                        ${content.getData()?replace("<p></p>","")} 
1060                                    </div> 
1061                                </div> 
1062                                 
1063                            </#if> 
1064                             
1065                        </div> 
1066                         
1067                    </#if> 
1068 
1069                </#list> 
1070            </#if> 
1071              
1072        </section> 
1073         
1074        <@getCustomRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists /> 
1075         
1076    </article> 
1077     
1078    <footer class="interior-article-footer"> 
1079        <ul class="interior-article-footer-items-list"> 
1080            <li class="interior-article-footer-item interior-article-profile"><a class="inner-link" href="/tableau-de-bord" title="Gérer mon profil">Mon profil</a></li> 
1081        <li class="interior-article-footer-item interior-article-rss"><a class="inner-link" href="/les-flux-rss-de-l-agglo">Les flux RSS de l'agglo</a></li> 
1082        <li class="interior-article-footer-item interior-article-print"><button type="button" class="inner-link" title="Imprimer">Imprimer</button></li> 
1083        <li class="interior-article-footer-item interior-article-mail"><button type="button" class="inner-link" title="Partager par mail">Partager par mail</button></li> 
1084        <li class="interior-article-footer-item interior-article-twitter"><button type="button" class="inner-link" title="Partager sur Twitter">Partager sur Twitter</button></li> 
1085        <li class="interior-article-footer-item interior-article-facebook"><button type="button" class="inner-link" title="Partager sur Facebook">Partager sur Facebook</button></li> 
1086        </ul> 
1087    </footer> 
1088     
1089</div> 
1090 
1091<#-- FOOTER CONTACT --> 
1092 
1093<footer class="interior-content-footer interior-content-footer-displayed"> 
1094     
1095    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
1096        <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_CONTACT_SERVICE" /> 
1097    <#else> 
1098        <@getDefaultFooterContact /> 
1099    </#if> 
1100 
1101</footer> 
1102 
1103 
1104<#--************************************* 
1105** MEDIA DISPLAY 
1106*************************************--> 
1107 
1108<#macro getMedia media urlIframePortlet> 
1109     
1110    <#local mediaSrc = media.getData()/> 
1111     
1112    <#if mediaSrc != '' || urlIframePortlet != ''> 
1113         
1114        <#local mediaType = media.media_type.getData() /> 
1115        <#local width = media.width.getData() /> 
1116        <#local width = media.width.getData() /> 
1117        <#if width == 'null'> 
1118            <#local width = '' /> 
1119        </#if> 
1120        <#if width != ""> 
1121            <#local width = 'style="width:'+width+'px;"' /> 
1122        </#if> 
1123        <#local height = media.height.getData() /> 
1124        <#if height == 'null'> 
1125            <#local height = '' /> 
1126        </#if> 
1127        <#local displayMode = media.display_mode.getData() /> 
1128        <#local imgMini = media.img_mini.getData() /> 
1129        <#local alignment = media.alignment.getData() /> 
1130        <#local legend = media.legend.getData() /> 
1131        <#local altText = media.alt_text.getData() /> 
1132        <#if altText == 'null'> 
1133            <#local altText = '' /> 
1134        </#if> 
1135         
1136        <figure class="interior-article-media interior-article-media-${alignment}" ${width}> 
1137             
1138            <#switch mediaType> 
1139                <#case "image"> 
1140                    <#if displayMode == "normal"> 
1141                       <@getImageMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet altText=altText height=height /> 
1142                    <#elseif displayMode == "popup"> 
1143                        <@getImageMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
1144                    </#if> 
1145                    <#break > 
1146                <#case "video"> 
1147                    <#if displayMode == "normal"> 
1148                       <@getVideoMedia imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
1149                    <#elseif displayMode == "popup"> 
1150                        <@getVideoMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
1151                    </#if> 
1152                    <#break > 
1153                <#case "pdf"> 
1154                    <#if displayMode == "normal"> 
1155                       <@getPdfMedia mediaSrc=mediaSrc height=height /> 
1156                    <#elseif displayMode == "popup"> 
1157                        <@getPdfMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
1158                    </#if> 
1159                    <#break > 
1160                <#case "iframe"> 
1161                    <#if displayMode == "normal"> 
1162                       <@getIframeMedia urlIframePortlet=urlIframePortlet height=height /> 
1163                    <#elseif displayMode == "popup"> 
1164                        <@getIframeMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
1165                    </#if> 
1166                    <#break > 
1167                <#case "svg"> 
1168                    <#if displayMode == "normal"> 
1169                       <@getSvgMedia mediaSrc=mediaSrc height=height /> 
1170                    <#elseif displayMode == "popup"> 
1171                        <@getSvgMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
1172                    </#if> 
1173                    <#break > 
1174                <#case "flash"> 
1175                    <#if displayMode == "normal"> 
1176                       <@getFlashMedia mediaSrc=mediaSrc height=height /> 
1177                    <#elseif displayMode == "popup"> 
1178                        <@getFlashMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
1179                    </#if> 
1180                    <#break > 
1181                <#case "portlet"> 
1182                    <#if displayMode == "normal"> 
1183                       <@getPortletMedia urlIframePortlet=urlIframePortlet height=height /> 
1184                    <#elseif displayMode == "popup"> 
1185                        <@getPortletMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
1186                    </#if> 
1187                    <#break > 
1188                <#case "flickr"> 
1189                    <#if displayMode == "normal"> 
1190                       <@getFlickrMedia urlIframePortlet=urlIframePortlet /> 
1191                    <#elseif displayMode == "popup"> 
1192                        <@getFlickrMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
1193                    </#if> 
1194                    <#break > 
1195                <#case "gallery"> 
1196                    <#if displayMode == "normal"> 
1197                       <@getGalleryMedia mediaSrc=mediaSrc height=height /> 
1198                    <#elseif displayMode == "popup"> 
1199                        <@getGalleryMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
1200                    </#if> 
1201                    <#break > 
1202                <#case "carousel"> 
1203                    <#if displayMode == "normal"> 
1204                       <@getCarouselMedia mediaSrc=mediaSrc height=height /> 
1205                    <#elseif displayMode == "popup"> 
1206                        <@getCarouselMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
1207                    </#if> 
1208                    <#break > 
1209                <#default> 
1210            </#switch> 
1211             
1212            <#local hasLegend = legend?length != 0 /> 
1213            <#if hasLegend> 
1214                <figcaption class="interior-article-media-legend">${legend}</figcaption> 
1215            </#if> 
1216             
1217        </figure> 
1218         
1219    </#if> 
1220     
1221</#macro> 
1222 
1223 
1224<#macro getImageMedia mediaSrc urlIframePortlet altText height > 
1225    <#local displayedHeight = '' /> 
1226    <#if height != ""> 
1227        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1228    </#if> 
1229    <#if urlIframePortlet != ""> 
1230        <#assign target = "href='"+ urlIframePortlet +"'" /> 
1231        <#if !isInternalLink(urlIframePortlet)> 
1232            <#assign target = target + " target='_blank' rel='noopener noreferrer'" /> 
1233        </#if> 
1234        <a ${target}> 
1235    </#if> 
1236    <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${mediaSrc}" alt="${altText}" ${displayedHeight} /> 
1237    <#if urlIframePortlet != ""> 
1238        </a> 
1239    </#if> 
1240</#macro> 
1241 
1242 
1243<#macro getImageMediaPopup imgMini mediaSrc altText height > 
1244    <#local displayedHeight = '' /> 
1245    <#if height != ""> 
1246        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1247    </#if> 
1248    <a class="link-img" href="${mediaSrc}" title="${altText}"> 
1249        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
1250    </a> 
1251</#macro> 
1252 
1253 
1254<#macro getVideoMedia imgMini mediaSrc height altText> 
1255    <div class="lazy-video" data-video="${mediaSrc}" data-height="${height}" data-text="${htmlUtil.escapeAttribute(altText)}" data-poster="${imgMini}" ></div> 
1256</#macro> 
1257 
1258 
1259<#macro getVideoMediaPopup imgMini mediaSrc altText height > 
1260    <#local displayedHeight = '' /> 
1261    <#if height != ""> 
1262        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1263    </#if> 
1264    <a class="link-video" href="${mediaSrc}" title="${altText}"> 
1265        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} /> 
1266    </a> 
1267</#macro> 
1268 
1269 
1270<#macro getPdfMedia mediaSrc height > 
1271    <#local displayedHeight = '' /> 
1272    <#if height != ""> 
1273        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
1274    </#if> 
1275    <iframe class="interior-article-media-iframe" data-src="${pdfViewer+mediaSrc}" ${displayedHeight} allowfullscreen ></iframe> 
1276</#macro> 
1277 
1278 
1279<#macro getPdfMedia mediaSrc height > 
1280    <#local displayedHeight = '' /> 
1281    <#if height != ""> 
1282        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
1283    </#if> 
1284    <iframe class="interior-article-media-iframe" src="${pdfViewer+mediaSrc}" ${displayedHeight} allowfullscreen></iframe>     
1285</#macro> 
1286 
1287 
1288<#macro getPdfMediaPopup imgMini mediaSrc altText height > 
1289    <#local displayedHeight = '' /> 
1290    <#if height != ""> 
1291        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1292    </#if> 
1293    <a class="link-pdf" href="${mediaSrc}"> 
1294        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
1295    </a> 
1296</#macro> 
1297 
1298 
1299<#macro getIframeMedia urlIframePortlet height > 
1300    <#local displayedHeight = '' /> 
1301    <#if height != ""> 
1302        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
1303    </#if> 
1304    <iframe class="interior-article-media-iframe" src="${urlIframePortlet}" ${displayedHeight} allowfullscreen></iframe> 
1305</#macro> 
1306 
1307 
1308<#macro getIframeMediaPopup imgMini urlIframePortlet altText height > 
1309    <#local displayedHeight = '' /> 
1310    <#if height != ""> 
1311        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1312    </#if> 
1313    <a class="link-iframe" href="${urlIframePortlet}"> 
1314        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
1315    </a> 
1316</#macro> 
1317 
1318 
1319<#macro getSvgMedia mediaSrc height > 
1320 
1321</#macro> 
1322 
1323 
1324<#macro getSvgMediaPopup imgMini mediaSrc altText height > 
1325 
1326</#macro> 
1327 
1328 
1329<#macro getFlashMedia mediaSrc height > 
1330    <#local displayedHeight = '' /> 
1331    <#if height != ""> 
1332        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
1333    </#if> 
1334    <object class="interior-article-media-object" type="application/x-shockwave-flash"  data="${mediaSrc}" ${displayedHeight}></object>  
1335</#macro> 
1336 
1337 
1338<#macro getFlashMediaPopup imgMini mediaSrc altText height > 
1339    <#local displayedHeight = '' /> 
1340    <#if height != ""> 
1341        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1342    </#if> 
1343    <a class="link-flash" href="${mediaSrc}"> 
1344        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
1345    </a> 
1346</#macro> 
1347 
1348 
1349<#macro getPortletMedia urlIframePortlet height > 
1350     
1351    <#local displayedHeight = '' /> 
1352    <#if height != ""> 
1353        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1354    </#if> 
1355     
1356    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
1357    <#local hasQueryString = urlIframePortlet?contains('?') /> 
1358    <#local portletId = urlIframePortlet /> 
1359    <#local queryString = '' /> 
1360     
1361    <#if hasInstanceId> 
1362        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
1363    </#if> 
1364    <#if hasQueryString> 
1365        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
1366        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
1367    </#if> 
1368     
1369    <#local divId = "embedded-portlet-" + portletId /> 
1370    <#local plid = themeDisplay.plid /> 
1371     
1372    <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') || urlIframePortlet?contains('cuCreate')> 
1373        <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
1374     
1375        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" ${displayedHeight}></div> 
1376         
1377    <#else> 
1378         
1379        <#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 /> 
1380         
1381        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" ${displayedHeight}></div> 
1382         
1383    </#if> 
1384     
1385</#macro> 
1386 
1387 
1388<#macro getPortletMediaPopup imgMini urlIframePortlet altText height > 
1389       
1390    <#local divId = "embedded-portlet-" + urlIframePortlet /> 
1391     
1392    <#local displayedHeight = '' /> 
1393    <#if height != ""> 
1394        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1395    </#if> 
1396     
1397    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
1398    <#local hasQueryString = urlIframePortlet?contains('?') /> 
1399    <#local portletId = urlIframePortlet /> 
1400    <#local queryString = '' /> 
1401 
1402    <#if hasInstanceId> 
1403        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
1404    </#if> 
1405    <#if hasQueryString> 
1406        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
1407        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
1408    </#if> 
1409     
1410    <#if themeDisplay?? && themeDisplay.plid?? > 
1411         
1412        <#local plid = themeDisplay.plid /> 
1413         
1414        <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') > 
1415            <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
1416      
1417            <#local formTitle = "" /> 
1418            <#local formPictoClass = "" /> 
1419            <#if urlIframePortlet?contains('FiberOpticalConnectionRequest')> 
1420                <#local formTitle = "Demande d'information pour le raccordement à la fibre optique" /> 
1421                <#local formPictoClass = "eservice-form-opener-picto-fiber" /> 
1422            <#elseif urlIframePortlet?contains('AntContact')> 
1423                <#local formTitle = "Contacter l'aménagement numérique du territoire" /> 
1424                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
1425            <#elseif urlIframePortlet?contains('ReinscriptionConservatoire')> 
1426                <#local formTitle = "Formulaire de réinscription au conservatoire" /> 
1427                <#local formPictoClass = "eservice-form-opener-picto-music" /> 
1428            <#elseif urlIframePortlet?contains('ContactUs')> 
1429                <#local formTitle = "Contacter l'agglo" /> 
1430                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
1431            <#elseif urlIframePortlet?contains('JobApplication')> 
1432                <#local formTitle = "Postuler à une offre d'emploi" /> 
1433                <#local formPictoClass = "eservice-form-opener-picto-job" /> 
1434            <#elseif urlIframePortlet?contains('WastebinRepair')> 
1435                <#local formTitle = "Demande de nouveau bac ou de réparation" /> 
1436                <#local formPictoClass = "eservice-form-opener-picto-wastebin" /> 
1437            <#elseif urlIframePortlet?contains('WastewaterConnection')> 
1438                <#local formTitle = "Raccorder ou brancher mon installation au réseau d'eaux usées" /> 
1439                <#local formPictoClass = "eservice-form-opener-picto-water" /> 
1440            <#elseif urlIframePortlet?contains('WastesortingTour')> 
1441                <#local formTitle = "Visiter le centre de tri" /> 
1442                <#local formPictoClass = "eservice-form-opener-picto-altriane" /> 
1443            </#if> 
1444             
1445            <div class="link-portlet eservice-form-opener" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" tabindex="0"> 
1446                <div class="eservice-form-opener-picto ${formPictoClass}"></div> 
1447                <p class="eservice-form-opener-text">${formTitle}</p> 
1448            </div> 
1449             
1450        <#else> 
1451             
1452            <#local portletClass = "link-portlet" /> 
1453            <#if urlIframePortlet?contains('19_WAR')> 
1454                <#local portletClass = "link-portlet planning-cmd-opener" /> 
1455            </#if> 
1456            <#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 /> 
1457         
1458            <div class="${portletClass}" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" tabindex="0"> 
1459                <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
1460            </div> 
1461         
1462        </#if> 
1463         
1464    </#if> 
1465     
1466</#macro> 
1467 
1468 
1469<#macro getFlickrMedia urlIframePortlet > 
1470    <div class="interior-article-media-flickr" data-embed-flickr='${urlIframePortlet}'></div> 
1471</#macro> 
1472 
1473 
1474<#macro getFlickrMediaPopup imgMini urlIframePortlet altText height > 
1475    <#local displayedHeight = '' /> 
1476    <#if height != ""> 
1477        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
1478    </#if> 
1479    <div class="link-flickr" data-flickr='${urlIframePortlet}' tabindex="0"> 
1480        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
1481    </div> 
1482</#macro> 
1483 
1484 
1485<#macro getGalleryMedia mediaSrc height > 
1486 
1487</#macro> 
1488 
1489 
1490<#macro getGalleryMediaPopup imgMini mediaSrc altText height > 
1491 
1492</#macro> 
1493 
1494 
1495<#macro getCarouselMedia mediaSrc height > 
1496 
1497</#macro> 
1498 
1499 
1500<#macro getCarouselMediaPopup imgMini mediaSrc altText height > 
1501 
1502</#macro> 
1503 
1504 
1505<#--************************************* 
1506**  RELATED CONTENT 
1507*************************************--> 
1508 
1509<#function buildRelatedAssetTypedLists entry info > 
1510    <#assign relatedAssetTypedLists = {} /> 
1511    <#assign infos = "" /> 
1512    <#assign assetLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) /> 
1513 
1514    <#list assetLinks as assetLink> 
1515        <#if assetLink.getEntryId1() == entry.getEntryId() > 
1516            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId2()) /> 
1517        <#else> 
1518            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId1()) /> 
1519        </#if> 
1520         
1521        <#if assetLinkEntry?? && assetLinkEntry.isVisible() > 
1522            <#assign linkedAssetRenderer = assetLinkEntry.getAssetRenderer() /> 
1523     
1524            <#if linkedAssetRenderer.hasViewPermission(permissionChecker) > 
1525             
1526                <#assign type = assetLinkEntry.getClassName() /> 
1527                 
1528                <#assign newEntry = [{"assetEntry":assetLinkEntry,"assetLink":assetLink}] /> 
1529                <#if relatedAssetTypedLists?keys?seq_contains(type)> 
1530                    <#assign relatedAssetTypedList = relatedAssetTypedLists[type] + newEntry /> 
1531                <#else> 
1532                    <#assign relatedAssetTypedList = newEntry /> 
1533                </#if> 
1534                <#assign relatedAssetTypedLists = relatedAssetTypedLists + {type : relatedAssetTypedList} /> 
1535                <#-- 
1536                <#assign infos> 
1537                    ${infos} ${type}=${relatedAssetTypedLists[type]?size}  (${newEntry?first.getClassPK()}) <br/> 
1538                </#assign> 
1539                --> 
1540            </#if> 
1541        </#if> 
1542    </#list> 
1543     
1544    <#if info == "true"> 
1545        <#return infos /> 
1546    <#else> 
1547        <#return relatedAssetTypedLists /> 
1548    </#if> 
1549    <#return {} /> 
1550</#function> 
1551 
1552 
1553<#macro getCustomRelatedAssets relatedAssetTypedLists> 
1554    <#local hasRelatedAssets = "false" /> 
1555    <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?size != 0> 
1556        <#local hasRelatedAssets = "true" /> 
1557    </#if> 
1558    <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?size != 0> 
1559        <#local hasRelatedAssets = "true" /> 
1560    </#if> 
1561    <#-- 
1562    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
1563        <#local webContentNb = getRelatedWebContentNb(relatedAssetTypedLists[typeJournalArticle]) /> 
1564        <#if webContentNb != 0> 
1565            <#local hasRelatedAssets = "true" /> 
1566        </#if> 
1567    </#if> 
1568    --> 
1569    <#if hasRelatedAssets == "true" > 
1570        <aside class="interior-article-moreContent-container"> 
1571            <p class="interior-article-moreContent-title">En savoir plus</p> 
1572            <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?has_content > 
1573                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeBookmarksEntry structure=""/> 
1574            </#if> 
1575            <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?has_content > 
1576                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeDLFileEntry structure="" /> 
1577            </#if> 
1578        </aside> 
1579    </#if> 
1580</#macro> 
1581 
1582 
1583<#macro getTypedRelatedAssets relatedAssetTypedLists type structure> 
1584    <#if type == typeJournalArticle && structure == "CDA_ZOOM_SUR" > 
1585        <@getRelatedZoomSur assets=relatedAssetTypedLists[type] /> 
1586    <#elseif type == typeJournalArticle && structure == "CDA_CONTACT_SERVICE" > 
1587        <@getRelatedFooterContact assets=relatedAssetTypedLists[type] /> 
1588    <#elseif type == typeBookmarksEntry > 
1589        <@getRelatedPages assets=relatedAssetTypedLists[type] /> 
1590    <#elseif type == typeDLFileEntry > 
1591        <@getRelatedDocuments assets=relatedAssetTypedLists[type] /> 
1592    </#if> 
1593</#macro> 
1594 
1595 
1596<#macro getRelatedZoomSur assets> 
1597    <#if assets?size != 0> 
1598        <#list assets as assetMap> 
1599            <#local asset = assetMap.assetEntry /> 
1600            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
1601            <#local strucName = journalStructureLocalService.getStructure(article.getGroupId(), article.getStructureId(), true).getName(locale) /> 
1602            <#if strucName == 'CDA_ZOOM_SUR'> 
1603                <#local img = getField(article,"back_img")/> 
1604                <#local url = getField(article,"url_link")/> 
1605                <#local target = "href='"+ url +"'" /> 
1606                <#if !isInternalLink(url)> 
1607                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
1608                </#if> 
1609                <div class="article-header-alert"> 
1610                    <#if url != ""> 
1611                        <a class="inner-link" ${target}> 
1612                    </#if> 
1613                    <img src="${img}" alt="${asset.getTitleCurrentValue()}"/> 
1614                    <h3 class="article-header-alert-title">${asset.getTitleCurrentValue()}</h3> 
1615                    <#if url != ""> 
1616                        </a> 
1617                    </#if> 
1618                </div> 
1619            </#if> 
1620        </#list> 
1621    </#if> 
1622</#macro> 
1623 
1624<#macro getRelatedFooterContact assets> 
1625    <#if assets?size == 0> 
1626        <@getDefaultFooterContact /> 
1627    <#else> 
1628        <#local hasContactFooter = false /> 
1629    	<#list assets as assetMap> 
1630            <#local asset = assetMap.assetEntry /> 
1631            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
1632            <#local strucName = journalStructureLocalService.getStructure(article.getGroupId(), article.getStructureId(), true).getName(locale) /> 
1633            <#if strucName == 'CDA_CONTACT_SERVICE'> 
1634                <#local contact_service = getField(article,"Contact_service")/> 
1635                <#local adresse = getField(article,"Adresse")/> 
1636                <#local cp = getField(article,"CP")/> 
1637                <#local ville = getField(article,"Ville")/> 
1638                <#local telephone = getField(article,"Telephone")/> 
1639                <#if telephone==""> 
1640                    <#local telephone = "05 46 30 34 00" /> 
1641                </#if> 
1642                <#local courriel = getField(article,"Courriel")/> 
1643                <#local annuaire = getField(article,"annuaire_link")/> 
1644                <#if annuaire==""> 
1645                    <#local annuaire = "/annuaire-des-services"/> 
1646                </#if> 
1647                <a class="interior-content-footer-contact interior-content-footer-service" href="${annuaire}"> 
1648                    Contact<br/> 
1649                    ${asset.getTitle(locale)} 
1650                </a> 
1651                <p class="interior-content-footer-contact interior-content-footer-address"> 
1652                    <span class="interior-content-footer-contact-inner">${adresse}<br/>${cp} ${ville}</span> 
1653                </p> 
1654                <p class="interior-content-footer-contact interior-content-footer-phone"> 
1655                    <span class="interior-content-footer-contact-inner">${telephone}</span> 
1656                </p> 
1657                <a class="interior-content-footer-contact interior-content-footer-email" href="mailto:${courriel}?subject=Contact%20site%20Agglo"> 
1658                    <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
1659                </a> 
1660                <a class="interior-content-footer-annuaire" href="${annuaire}">Annuaire des services</a> 
1661                <#local hasContactFooter = true /> 
1662                <#break /> 
1663            </#if> 
1664        </#list> 
1665        <#if hasContactFooter == false> 
1666            <@getDefaultFooterContact /> 
1667        </#if> 
1668	</#if> 
1669</#macro> 
1670 
1671 
1672<#macro getDefaultFooterContact > 
1673    <a class="interior-content-footer-contact interior-content-footer-service" href="/annuaire-des-services"> 
1674        Contact<br/> 
1675        Agglo La Rochelle 
1676    </a> 
1677    <p class="interior-content-footer-contact interior-content-footer-address"> 
1678        <span class="interior-content-footer-contact-inner">6, rue Saint-Michel<br/>17000 La Rochelle</span> 
1679    </p> 
1680    <p class="interior-content-footer-contact interior-content-footer-phone"> 
1681        <span class="interior-content-footer-contact-inner">05 46 30 34 00</span> 
1682    </p> 
1683    <a class="interior-content-footer-contact interior-content-footer-email" href="/contacter-l-agglo"> 
1684        <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
1685    </a> 
1686    <a class="interior-content-footer-annuaire" href="/annuaire-des-services">Annuaire des services</a> 
1687</#macro> 
1688 
1689 
1690<#function getRelatedWebContentNb assets> 
1691    <#local nb = 0 /> 
1692    <#if assets?size != 0> 
1693        <#local nb = 0 /> 
1694        <#list assets as assetMap> 
1695            <#local asset = assetMap.assetEntry /> 
1696            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
1697            <#local strucName = journalStructureLocalService.getStructure(article.getGroupId(), article.getStructureId(), true).getName(locale) /> 
1698            <#if strucName != 'CDA_CONTACT_SERVICE' && strucName != 'CDA_ZOOM_SUR'> 
1699                <#local nb = nb + 1 /> 
1700            </#if> 
1701        </#list> 
1702    </#if> 
1703    <#return nb /> 
1704</#function> 
1705 
1706 
1707<#macro getRelatedPages assets> 
1708    <ul> 
1709        <#local orderedAssets = getOrderedAssets(assets) /> 
1710        <#list orderedAssets?reverse as assetMap> 
1711            <#local asset = assetMap.assetEntry /> 
1712            <#local assetLink = assetMap.assetLink /> 
1713            <#local linkedAssetRenderer = asset.getAssetRenderer() /> 
1714            <#local assetLinkEntryTitle = asset.getTitle(locale) /> 
1715            <#local assetLinkEntryDescription = asset.getDescription() /> 
1716            <#local assetLinkBookmark = bookmarksEntryLocalService.getEntry(asset.getClassPK()) /> 
1717            <#local assetURL = assetLinkBookmark.getUrl() /> 
1718             
1719            <#local target = "" /> 
1720            <#if assetURL?contains('widget') || assetURL?contains('iframe') || assetURL?contains('embed') > 
1721                <#local target = " data-iframe='true' href='"+ assetURL +"' class='link-iframe'" /> 
1722            <#else> 
1723                <#local target = "href='"+ assetURL +"'" /> 
1724                <#if !isInternalLink(assetURL)> 
1725                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
1726                </#if> 
1727            </#if> 
1728 
1729            <li class="interior-article-moreContent" data-entry-id="${asset.getEntryId()}"><a ${target} title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}">${assetLinkEntryTitle}</a></li> 
1730       </#list> 
1731   </ul> 
1732</#macro> 
1733 
1734 
1735<#macro getRelatedDocuments assets> 
1736     
1737    <#assign folderNb = 0 /> 
1738    <#local orderedAssets = getOrderedAssets(assets) /> 
1739    <#local collapsedFolders = false /> 
1740     
1741    <#list orderedAssets?reverse as assetMap> 
1742     
1743        <#local asset = assetMap.assetEntry /> 
1744        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
1745 
1746        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
1747        <#local folder = fileEntry.getFolder() /> 
1748        <#local folderDescription = folder.getDescription()/> 
1749        <#if folderDescription != ""> 
1750            <#if documents?size &gt; 5> 
1751                <#local collapsedFolders = true /> 
1752            </#if> 
1753        </#if> 
1754    </#list> 
1755     
1756    <#list orderedAssets?reverse as assetMap> 
1757     
1758        <#local asset = assetMap.assetEntry /> 
1759        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
1760 
1761        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
1762        <#local folder = fileEntry.getFolder() /> 
1763        <#local folderDescription = folder.getDescription()/> 
1764        <#if folderDescription != ""> 
1765            <#if collapsedFolders == true> 
1766                <input type="checkbox" class="interior-article-moreContent-checkbox" id="interior-article-moreContent-checkbox-${folderNb}" name="interior-article-moreContent-checkbox-${folderNb}"> 
1767                <p class="interior-article-moreContent-title"><label for="interior-article-moreContent-checkbox-${folderNb}">${folderDescription}</label></p> 
1768                <#assign folderNb = folderNb + 1 /> 
1769            <#else> 
1770                <p class="interior-article-moreContent-title">${folderDescription}</p> 
1771            </#if> 
1772        </#if> 
1773         
1774        <ul class="interior-article-moreContent-list"> 
1775            <#local orderedDocs = getOrderedDocs(documents) /> 
1776            <#list orderedDocs?reverse as docEntry> 
1777                 
1778                <#if !docEntry.isInTrash()> 
1779                     
1780                    <#local assetDocEntry = assetEntryLocalService.getEntry(docEntry.getGroupId(),docEntry.getUuid()) /> 
1781                     
1782                    <#if assetDocEntry.getAssetRenderer()??> 
1783                     
1784                        <#local linkedAssetRenderer = assetDocEntry.getAssetRenderer() /> 
1785                         
1786                        <#local assetLinkEntryTitle = assetDocEntry.getTitle(locale) /> 
1787                        <#local assetLinkEntryDescription = assetDocEntry.getDescription(locale) /> 
1788                        <#local extension = docEntry.getLatestFileVersion(true).getExtension() /> 
1789                         
1790                        <#local assetURL = linkedAssetRenderer.getURLDownload(themeDisplay) /> 
1791                         
1792                        <#local extensionType = "" /> 
1793                        <#switch extension> 
1794                            <#case "pdf"> 
1795                                <#local extensionType = "link-pdf" /> 
1796                                <#break> 
1797                            <#case "jpg"> 
1798                                <#local extensionType = "link-img" /> 
1799                                <#break> 
1800                            <#case "png"> 
1801                                <#local extensionType = "link-img" /> 
1802                                <#break> 
1803                            <#case "mp4"> 
1804                                <#local extensionType = "link-video" /> 
1805                                <#break> 
1806                            <#case "swf"> 
1807                                <#local extensionType = "link-flash" /> 
1808                                <#break> 
1809                            <#default> 
1810                        </#switch> 
1811                        <#assign dlFileEntry = docEntry.getLatestFileVersion(true)/> 
1812                         
1813                        <#local toDownload = "" /> 
1814                        <#if assetLinkEntryTitle?contains("- téléchargement")> 
1815                            <#local toDownload = "download" /> 
1816                            <#if assetURL?contains("?version")> 
1817                                <#local assetURL = assetURL + "&download=true" /> 
1818                            <#else> 
1819                                <#local assetURL = assetURL + "?download=true" /> 
1820                            </#if> 
1821                        </#if> 
1822                         
1823                        <#local target = " href='"+ assetURL +"'" /> 
1824                         
1825                        <li class="interior-article-moreContent" data-entry-id="${asset.entryId}"> 
1826                           <a ${target} class="extension-${extension} ${extensionType}" title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}" ${toDownload} > 
1827                                ${assetLinkEntryTitle} <span class="interior-article-moreContent-extension">${extension}</span> 
1828                            </a>  
1829                        </li> 
1830                         
1831                    </#if> 
1832                     
1833                </#if> 
1834                 
1835            </#list> 
1836        </ul> 
1837         
1838    </#list> 
1839     
1840</#macro> 
1841 
1842 
1843<#function getOrderedAssets assets> 
1844    <#local orderedAssets = [] /> 
1845    <#local assetsWithDate = [] /> 
1846    <#list assets as assetMap> 
1847        <#local asset = assetMap.assetEntry /> 
1848        <#local modifiedDate = asset.getModifiedDate() /> 
1849        <#local assetsWithDate = assetsWithDate + [{'assetMap':assetMap,'modifiedDate':modifiedDate}] /> 
1850    </#list> 
1851    <#list assetsWithDate?sort_by('modifiedDate') as orderedAsset> 
1852        <#local orderedAssets = orderedAssets + [orderedAsset.assetMap] /> 
1853    </#list> 
1854    <#return orderedAssets> 
1855</#function> 
1856 
1857<#function getOrderedDocs docs> 
1858    <#local orderedDocs = [] /> 
1859    <#local docsWithDate = [] /> 
1860    <#list docs as docMap> 
1861        <#local doc = assetEntryLocalService.getEntry(docMap.getGroupId(),docMap.getUuid()) /> 
1862        <#local modifiedDate = doc.getModifiedDate() /> 
1863        <#local docsWithDate = docsWithDate + [{'docMap':docMap,'modifiedDate':modifiedDate}] /> 
1864    </#list> 
1865    <#list docsWithDate?sort_by('modifiedDate') as orderedDoc> 
1866        <#local orderedDocs = orderedDocs + [orderedDoc.docMap] /> 
1867    </#list> 
1868    <#return orderedDocs> 
1869</#function> 
1870 
1871 
1872<#function isInternalLink link> 
1873  <#local internal = link?contains("www.agglo-larochelle.fr") || link?contains("www2.agglo-larochelle.fr") || link?contains("www-new.agglo-larochelle.fr") || !link?contains("//")> 
1874  <#return internal> 
1875</#function> 
1876 
1877 
1878<#function getField journalArticle fieldName> 
1879    <#local fieldValue = ''/> 
1880     <#local document = saxReaderUtil.read(journalArticle.getContent()) /> 
1881     <#local rootElement = document.getRootElement() /> 
1882     <#if (rootElement?? && rootElement?has_content)> 
1883        <#local xPathSelector =  saxReaderUtil.createXPath("dynamic-element[@name='"+fieldName+"']/dynamic-content") /> 
1884        <#if (validator.isNotNull(xPathSelector))> 
1885        <#local nbNodes = xPathSelector.selectNodes(rootElement)?size /> 
1886        <#if (nbNodes &gt; 0)> 
1887            <#local fieldValue = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
1888        </#if> 
1889     </#if> 
1890     <#return fieldValue /> 
1891     </#if> 
1892</#function>