Retour

Le projet d’aménagement de la Gare de La Rochelle s'expose dans les communes

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