Une erreur s'est produite en traitant le calibre.
Error on line 82, column 29 in 20155#20195#195325
JournalArticleLocalService.getArticleByUrlTitle(groupId, campaign.getData()) is undefined.
It cannot be assigned to bannerContent
1<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
2<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
3<#assign JournalContentSearchLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalContentSearchLocalService") /> 
4<#assign LayoutLocalService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") /> 
5<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetVocabularyLocalService") /> 
6 
7<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext() /> 
8<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
9<#assign colorId = themeDisplay.getColorSchemeId() /> 
10 
11<#assign universeUrl = "" /> 
12<#assign universeName = "" /> 
13<#assign thematicUrl = "" /> 
14<#assign thematicName = "" /> 
15<#assign currentArticleUrl = "" /> 
16<#assign isArticle = false /> 
17<#assign breadcrumbLevel = 1 /> 
18 
19<article class="article"> 
20    <section class="article__history-back"> 
21        <div class="container"> 
22            <a class="waves-effect btn btn-flat text-grey-darken-4-i rounded-pill my-1" href="javascript:history.back();"><span class="d-flex align-items-center justify-content-center"><i class="icon-cardif-angle-left text-100 pr-2 lh-150"></i><span>Retour</span></span></a> 
23        </div> 
24    </section> 
25     
26    <#assign imageUrl = "" /> 
27    <#assign imageOverlay = "" /> 
28    <#if image.getData()?has_content> 
29        <#assign imageUrl = image.getData() /> 
30        <#if image.overlay?? && image.overlay.getData()?has_content> 
31            <#assign imageOverlay = image.overlay.getData() /> 
32        </#if> 
33    </#if> 
34    <section class="article__illustration banner-header bg-lazy ${imageOverlay} floating-ctas-trigger " data-src="${imageUrl}"> 
35        <div class="container"> 
36            <div class="row d-flex justify-content-center"> 
37                <div class="col-lg-8"> 
38                    <h1 class="text-center m-0 pt-5 pb-3">${.vars['reserved-article-title'].data}</h1> 
39                </div> 
40            </div> 
41        </div> 
42    </section> 
43     
44    <!--Main Content--> 
45    <section id="article-content" class="article__content mt-1 mt-md-n10 text-light"> 
46        <div class="container"> 
47            <div class="row d-flex justify-content-center"> 
48                <div class="col-lg-10 px-3 px-lg-9 py-5 bg-white rounded-top"> 
49                    <#assign displayDate = .vars['reserved-article-display-date'].data> 
50                    <#assign modifiedDate = .vars['reserved-article-modified-date'].data> 
51                    <#-- Save the original page locale for later --> 
52                    <#assign originalLocale = locale> 
53                     
54                    <#-- Set the page locale to the portals default locale --> 
55                    <#setting locale = localeUtil.getDefault()> 
56                     
57                    <#-- Parse the date to a date object --> 
58                    <#assign publishedDate = displayDate?date("EEE, d MMM yyyy")> 
59                    <#assign displayDate = displayDate?datetime("EEE, d MMM yyyy HH:mm:ss")> 
60					<#assign modifiedDate = modifiedDate?datetime("EEE, d MMM yyyy HH:mm:ss")> 
61                     
62                    <#-- Set the page locale back to the original page locale --> 
63                    <#assign locale = originalLocale> 
64 
65                    <#if publishedDate?? > 
66                        <time class="published-date text-xl-65 text-md-75 text-80 d-block mb-3" datetime="${dateUtil.getDate(publishedDate, "yyyy-MM-dd", locale)}">Publié le ${dateUtil.getDate(publishedDate, "dd MMMM yyyy", locale)} </time> 
67                    </#if> 
68                     
69                    <#if intro.getData()?has_content> 
70                        <p class="intro text-grey-lighten-1 text-120 text-normal mb-5"> 
71                            ${intro.getData()} 
72                        </p> 
73                    </#if> 
74                    ${description.getData()} 
75                     
76                    <#-- campaign banner --> 
77                    <#if campaign.getData()?has_content> 
78                        <div class="article__banner-campaign"> 
79							<#assign bannerContent = "" /> 
80                    	    <#assign bannerContentId = "" /> 
81                    	     
82                    	    <#assign bannerContent = JournalArticleLocalService.getArticleByUrlTitle(groupId, campaign.getData()) /> 
83                    	    <#if bannerContent??> 
84                                <#assign bannerContentId = bannerContent.getArticleId() /> 
85                            </#if> 
86                             
87                            <#if bannerContentId??> 
88                                <#assign bannerContent = journalContentUtil.getContent(groupId, bannerContentId, viewMode, localeUtil.getDefault(), themeDisplay) /> 
89                                ${bannerContent} 
90                            </#if> 
91                    	</div> 
92                    </#if> 
93                     
94                     
95                    <!-- Social network --> 
96                    <div id="article_share" class="bg-grey-lighten-5 d-flex flex-column flex-md-row align-items-center justify-content-between mt-5"> 
97                        <div id="total_count" class="px-3 py-2 py-md-0"> 
98                            <span class="icon-cardif-share align-middle"> 
99                                <!--picto--> 
100                            </span> 
101                            &nbsp; 
102                            <span class="article_share-title"> 
103                                Je partage cet article 
104                            </span> 
105                        </div> 
106                        <div id="social_networks"></div> 
107                    </div> 
108                </div> 
109            </div> 
110        </div> 
111    </section> 
112     
113    <#-- Push contents --> 
114    <#if promotion.getSiblings()?has_content> 
115        <section class="article__push-forward"> 
116        	<#list promotion.getSiblings() as cur_promotion> 
117        	    <#if cur_promotion.getData()?has_content> 
118            	    <#assign pushContent = "" /> 
119            	    <#assign pushContentId = "" /> 
120            	     
121            	    <#assign pushContent = JournalArticleLocalService.getArticleByUrlTitle(groupId, cur_promotion.getData()) /> 
122            	    <#if pushContent??> 
123                        <#assign pushContentId = pushContent.getArticleId() /> 
124                    </#if> 
125                     
126                    <#if pushContentId??> 
127                        <#assign pushContent = journalContentUtil.getContent(groupId, pushContentId, viewMode, localeUtil.getDefault(), themeDisplay) /> 
128                        ${pushContent} 
129                    </#if> 
130                </#if> 
131        	</#list> 
132    	</section> 
133    </#if> 
134	 
135	<#-- list categories of an article --> 
136	<#assign journalArticleId = .vars['reserved-article-id'].data> 
137	<#assign journalArticleResourceLocalServiceUtil = staticUtil["com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceUtil"]> 
138	<#assign assetCategoryLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil"]> 
139	<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/> 
140	<#assign categoryList = assetCategoryLocalServiceUtil.getCategories("com.liferay.portlet.journal.model.JournalArticle",articleResourcePK) > 
141 
142	<#-- Get vocabulary from category --> 
143	<#assign assetVocabularyLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetVocabularyLocalServiceUtil"]> 
144	<#assign dossierThematiqueId = 0 /> 
145	<#list categoryList as category>			 
146		<#assign vocab = assetVocabularyLocalServiceUtil.getVocabulary(category.getVocabularyId()) /> 
147		<#if vocab.getName()?index_of("Dossier Thématique") != -1> 
148			<#assign dossierThematiqueId = category.getCategoryId() /> 
149		</#if> 
150		<#if "Article" == category.getName()> 
151			<#assign isArticle = true /> 
152		</#if> 
153	</#list> 
154	 
155	<#-- Get Current article URL --> 
156	<#assign currentLayoutIds = JournalContentSearchLocalService.getLayoutIds(groupId, false, journalArticleId) /> 
157	<#if currentLayoutIds?has_content> 
158		<#list currentLayoutIds as layoutId> 
159			<#assign currentArticleLayout = LayoutLocalService.getLayout(groupId, false, layoutId) /> 
160			<#assign currentArticleUrl = currentArticleLayout.getFriendlyURL(locale) /> 
161			<#break /> 
162		</#list> 
163		 
164		<#if currentArticleUrl?index_of("/assurance-emprunteur") == 0> 
165			<#assign universeUrl = "/assurance-emprunteur" /> 
166			<#assign universeName = "Assurance de prêt immobilier" /> 
167			<#assign breadcrumbLevel = 2 /> 
168		<#elseif currentArticleUrl?index_of("/assurance-prevoyance") == 0> 
169			<#assign universeUrl = "/assurance-prevoyance" /> 
170			<#assign universeName = "Prévoyance" /> 
171			<#assign breadcrumbLevel = 2 /> 
172		<#elseif currentArticleUrl?index_of("/placement-epargne") == 0> 
173			<#assign universeUrl = "/placement-epargne" /> 
174			<#assign universeName = "Epargne" /> 
175			<#assign breadcrumbLevel = 2 /> 
176		<#elseif currentArticleUrl?index_of("/epargne-retraite") == 0> 
177			<#assign universeUrl = "/epargne-retraite" /> 
178			<#assign universeName = "Retraite" /> 
179			<#assign breadcrumbLevel = 2 /> 
180		</#if> 
181	</#if> 
182	 
183	<#if dossierThematiqueId != 0> 
184		<!-- list of all similar articles --> 
185		<#assign assetEntryQuery = objectUtil('com.liferay.portlet.asset.service.persistence.AssetEntryQuery') /> 
186		<#assign search = assetEntryQuery.setOrderByCol1("publishDate") /> 
187		<#assign search = assetEntryQuery.setClassName("com.liferay.portlet.journal.model.JournalArticle") /> 
188		<#assign search = assetEntryQuery.setAnyCategoryIds([dossierThematiqueId]) /> 
189		<#assign assetEntryQueryService = objectUtil('com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil')> 
190		<#assign entries = assetEntryQueryService.getEntries(assetEntryQuery)> 
191		<#assign dossierThematiqueUrl = "" /> 
192	 
193		<#if entries?has_content> 
194			<section class="container my-4" > 
195				<div class="row d-flex justify-content-center"> 
196					<div class="col-lg-10 px-3 px-lg-9"> 
197						<div class="card h-100 m-0 b-0 bl-3 b-primary-i b-solid rounded-bottom py-5"> 
198							<div class="col-lg-12"> 
199								<h3 class="mb-4 text-primary-i"><span class="text-90 text-md-80 text-xl-100">Nos suggestions d'articles</span></h3> 
200							</div> 
201							<ul class="list-styled list-bullet-text-primary"> 
202								<#list entries as entry> 
203									<#assign assetRenderer = entry.getAssetRenderer() /> 
204									<#assign article = assetRenderer.getArticle() /> 
205									<#if journalArticleId != article.getArticleId() >  
206										<#assign entryTitle = assetRenderer.getTitle(locale) /> 
207										<#assign entryCategories = entry.getCategories() />	 
208		 
209										<#assign viewURL = "" /> 
210										<#assign layoutIds = JournalContentSearchLocalService.getLayoutIds(groupId, false, article.getArticleId()) /> 
211										<#if layoutIds?has_content> 
212											<#list layoutIds as layoutId> 
213												<#assign articleLayout = LayoutLocalService.getLayout(groupId, false,	layoutId) /> 
214												<#assign viewURL = articleLayout.getFriendlyURL(locale) /> 
215												<#break /> 
216											</#list> 
217										</#if> 
218										 
219										<#assign isTypeArticle = false /> 
220				 
221										<#if entryCategories?has_content > 
222											<#list entryCategories as category>																				 
223												<#assign subVocab = assetVocabularyLocalServiceUtil.getVocabulary(category.getVocabularyId()) /> 
224												<#if "Particulier Type Article" == subVocab.getName()> 
225													<#assign isTypeArticle = true /> 
226													<#break /> 
227												</#if>	 
228											</#list> 
229										</#if> 
230										 
231										<#if isTypeArticle >									 
232											<li class="mb-1 icon-cardif-hook-right"><a href="${viewURL}" class="text-black-i ho-text-underline fo-text-underline text-decoration-none text-xl-80">${entryTitle}</a></li>	 
233										<#else> 
234											<#assign thematicName = entryTitle /> 
235											<#assign thematicUrl = viewURL /> 
236											<#assign breadcrumbLevel = 3 /> 
237										</#if> 
238									</#if> 
239								</#list> 
240							</ul> 
241							<#if thematicUrl?has_content> 
242								<div class="col-lg-12 pt-2"> 
243									<p class="text-left"> 
244										<a class="btn w-100 w-md-70 w-xl-30 text-primary bg-white b-primary fo-b-primary-lighten ho-b-primary-lighten waves-effect" href="${thematicUrl}">Voir le dossier complet</a> 
245									</p> 
246								</div>	 
247							</#if> 
248						</div> 
249					</div>				 
250				</div> 
251			</section> 
252		</#if> 
253	</#if> 
254	 
255	<#-- Floating CTAs --> 
256    <#if floatingCTA.getData()?has_content> 
257        <#assign ctaArticle = JournalArticleLocalService.getArticleByUrlTitle(groupId, floatingCTA.getData()) /> 
258    <#else> 
259		<#if colorId == "02"> 
260    		 <#assign ctaArticle = JournalArticleLocalService.getArticleByUrlTitle(groupId, "floating-cta-assurer-mon-pret") /> 
261    	<#elseif colorId == "03"> 
262    		 <#assign ctaArticle = JournalArticleLocalService.getArticleByUrlTitle(groupId, "floating-cta-epargne") /> 
263    	<#elseif colorId == "04"> 
264    		 <#assign ctaArticle = JournalArticleLocalService.getArticleByUrlTitle(groupId, "floating-cta-retraite") /> 
265    	<#elseif colorId == "05"> 
266    		 <#assign ctaArticle = JournalArticleLocalService.getArticleByUrlTitle(groupId, "floating-cta-prevoyance") /> 
267    	</#if> 
268	</#if> 
269	 
270	<#if ctaArticle??> 
271        <#assign ctaArticleId = ctaArticle.getArticleId() /> 
272    </#if> 
273	 
274    <#if ctaArticleId??> 
275        <section id="article__ctas"> 
276            <#assign ctaArticle = journalContentUtil.getContent(groupId, ctaArticleId, viewMode, localeUtil.getDefault(), themeDisplay) /> 
277            ${ctaArticle} 
278        </section> 
279    </#if>			 
280</article> 
281 
282<!-- image inbenta --> 
283<div class="d-none" id="vignette-article"><img src="${.vars['reserved-article-small-image-url'].data}"></div> 
284 
285<style type="text/css"> 
286    .mat #social_networks .btn {border: transparent; color: #fff !important; } 
287    .mat #social_networks .icon-cardif-linkedin2 {background-color: #326eae;} 
288    .mat #social_networks .icon-cardif-linkedin2:focus, 
289    .mat #social_networks .icon-cardif-linkedin2:hover {background-color: #4887cb;} 
290    .mat #social_networks .icon-cardif-twitter2 {background-color: #52afec;} 
291    .mat #social_networks .icon-cardif-twitter2:focus, 
292    .mat #social_networks .icon-cardif-twitter2:hover {background-color: #80c4f1;} 
293    .mat #social_networks .icon-cardif-facebook2 {background-color: #495fa5;} 
294    .mat #social_networks .icon-cardif-facebook2:focus, 
295    .mat #social_networks .icon-cardif-facebook2:hover {background-color: #667abb;} 
296    .mat #social_networks .icon-cardif-share-mail {background-color: #00965e;} 
297    .mat #social_networks .icon-cardif-share-mail:focus, 
298    .mat #social_networks .icon-cardif-share-mail:hover {background-color: #00c97e;} 
299</style> 
300<script type="text/javascript" src="/documents/185959/186161/jquery.social-shares.min.js"></script> 
301<script type="text/javascript"> 
302    $(document).ready(function() { 
303    	$("#social_networks").jsSocials({ 
304           shares: ["linkedin", "twitter", "facebook", "email"] 
305       }); 
306    }); 
307</script> 
308<#if isArticle> 
309<script type = "application/ld+json"> 
310
311		"@context": "http://schema.org", 
312		"@type": "Article", 
313		"mainEntityOfPage": { 
314			"@type": "WebPage", 
315			"@id": "${themeDisplay.getPortalURL()}${currentArticleUrl}" 
316		}, 
317		"headline": "${htmlUtil.escape(htmlUtil.stripHtml(.vars['reserved-article-title'].data))}", 
318		"image": { 
319			"@type": "ImageObject", 
320			"url": "${themeDisplay.getPortalURL()}${imageUrl}", 
321			"height": 1600, 
322			"width": 400 
323		}, 
324		"datePublished": "${displayDate?iso_local}", 
325		"dateModified": "${modifiedDate?iso_local}", 
326		"author": { 
327			"@type": "Organization", 
328			"name": "Cardif France" 
329		}, 
330		"speakable": { 
331			"@type": "SpeakableSpecification", 
332			"cssSelector": ["#article-title", "#article-content"] 
333		}, 
334		"publisher": { 
335			"@type": "Organization", 
336			"name": "Cardif France", 
337			"logo": { 
338				"@type": "ImageObject", 
339				"url": "${themeDisplay.getPortalURL()}/documents/185959/226312/cardif-logo.png", 
340				"width": 160, 
341				"height": 42 
342
343		}, 
344		"description": "${htmlUtil.escape(htmlUtil.stripHtml(intro.getData()))}", 
345		"articleBody": "${htmlUtil.escape(htmlUtil.stripHtml(description.getData()))}" 
346
347</script> 
348</#if> 
349 
350<script type="application/ld+json"> 
351
352	"@context": "https://schema.org", 
353  	"@type": "BreadcrumbList", 
354  	"itemListElement": [ 
355	  	<#if breadcrumbLevel gt 1> 
356
357		    "@type": "ListItem", 
358		    "position": 1, 
359		    "name": "${htmlUtil.escape(htmlUtil.stripHtml(universeName))}", 
360		    "item": "${themeDisplay.getPortalURL()}${universeUrl}" 
361	  	}, 
362	  	</#if> 
363	  	<#if breadcrumbLevel gt 2> 
364
365		    "@type": "ListItem", 
366		    "position": 2, 
367		    "name": "${htmlUtil.escape(htmlUtil.stripHtml(thematicName))}", 
368		    "item": "${themeDisplay.getPortalURL()}${thematicUrl}" 
369	  	}, 
370	  	</#if> 
371
372		    "@type": "ListItem", 
373		    "position": ${breadcrumbLevel}, 
374		    "name": "${htmlUtil.escape(htmlUtil.stripHtml(.vars['reserved-article-title'].data))}", 
375		    "item": "${themeDisplay.getPortalURL()}${currentArticleUrl}" 
376
377
378
379</script>