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