Hoe stoppen met roken
Terug Hoe stoppen met roken
Er trad een fout op tijdens de verwerking van de sjabloon.
Java method "com.liferay.portal.kernel.util.DateUtil_IW.parseDate(String, String, Locale)" threw an exception when invoked on com.liferay.portal.kernel.util.DateUtil_IW object "com.liferay.portal.kernel.util.DateUtil_IW@644dc7b2"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: displayDate_object = dateUtil.parseDa... [in template "20101#20127#IDEWE.TEMPLATE.WEB2.ARTICLE" at line 88, column 17] ----
1<#setting url_escaping_charset='UTF-8'>
2<#assign
3newsArticleService = serviceLocator.findService("be.idewe.portal.website.articles.api.NewsArticleService")
4articleLanguageService = serviceLocator.findService("be.idewe.portal.website.article.language.api.ArticleLanguageService")
5fileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")
6journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
7pagesService = serviceLocator.findService("be.idewe.portal.website.pages.api.PagesService")
8parsingService = serviceLocator.findService("be.idewe.portal.website.articles.api.ParsingService")
9journalArticleId = .vars['reserved-article-id'].getData()
10
11article = journalArticleLocalService.getArticle(groupId, journalArticleId)
12
13themaList = newsArticleService.getThemas(journalArticleId, groupId)
14relatedNewsList = newsArticleService.getRelatedNews(journalArticleId, 5, 9, groupId, themeDisplay.getLocale())
15overviewUrl = pagesService.getNieuwsOverzichtUrl(themeDisplay)
16
17theme_tooltip_label = languageUtil.get(themeDisplay.getLocale(), 'idewe.news.theme.tooltip')
18
19themeHashKey = "theme"
20
21thisLayout = themeDisplay.getLayout()
22sourceUrl = themeDisplay.getURLCurrent()?keep_before("?")
23siteUrl = themeDisplay.getPathFriendlyURLPublic() + thisLayout.getGroup().getFriendlyURL()
24>
25<#if !sourceUrl?starts_with(siteUrl)>
26 <#assign siteUrl = ''>
27</#if>
28<#assign
29ancestorLayouts = thisLayout.getAncestors()
30parentLayout = ancestorLayouts[0]
31parentUrl = siteUrl + parentLayout.getFriendlyURL()
32
33breadcrumbsSeparatorClass = 'fas fa-angle-right'
34>
35
36<#macro languageWithArguments key arguments><#compress>
37 <#assign label><@liferay.language key="${key}" /></#assign>
38 <#if arguments?is_sequence>
39 <#list arguments as argument>
40 <#assign label = label?replace("{" + argument?index + "}", argument)>
41 </#list>
42 <#else>
43 <#assign label = label?replace("{0}", arguments)>
44 </#if>
45 ${label}
46</#compress></#macro>
47<#macro prettyPrintFileSize bytes><#compress>
48 <#assign kib = bytes?number / 1024>
49 <#if kib > 1 >
50 <#assign mib = kib / 1024>
51 <#if mib > 1 >
52 <#assign gib = mib / 1024>
53 <#if gib > 1 >
54 ${gib?string["0.#"]?replace(".", ",")} <@liferay.language key="idewe.file.size.gib" />
55 <#else>
56 ${mib?string["0.#"]?replace(".", ",")} <@liferay.language key="idewe.file.size.mib" />
57 </#if>
58 <#else>
59 ${kib?string["0.#"]?replace(".", ",")} <@liferay.language key="idewe.file.size.kib" />
60 </#if>
61 <#else>
62 ${bytes} <@liferay.language key="idewe.file.size.b" />
63 </#if>
64</#compress></#macro>
65<div class="news-article-breadcrumbs centered-content">
66 <nav id="breadcrumbs">
67 <ul class="breadcrumbs">
68 <#list ancestorLayouts?reverse as ancestorLayout>
69 <#assign nodeUrl = siteUrl + ancestorLayout.getFriendlyURL()>
70 <li>
71 <#if ancestorLayout?index != 0>
72 <i class="${breadcrumbsSeparatorClass}"></i>
73 </#if>
74 <a href="${nodeUrl}">${htmlUtil.escape(ancestorLayout.getName(themeDisplay.getLocale()))}</a>
75 </li>
76 </#list>
77 <li>
78 <i class="${breadcrumbsSeparatorClass}"></i>
79 ${.vars['reserved-article-title'].getData()}
80 </li>
81 </ul>
82 </nav>
83</div>
84
85<#if articleLanguageService.hasLocale(article, themeDisplay.getLocale())>
86 <#assign
87 displayDate_data = displayDate.getData()
88 displayDate_object = dateUtil.parseDate("yyyy-MM-dd", displayDate_data, themeDisplay.getLocale())
89 displayDate_formatted = dateUtil.getDate(displayDate_object, "d MMMM yyyy", themeDisplay.getLocale())
90 titleText = request.setAttribute("TITLE_TEXT", .vars['reserved-article-title'].getData())
91 >
92
93 <#if ogData?? && ogData.ogTitle?? && ogData.ogTitle?? && ogData.ogTitle.getData()?has_content>
94 <#assign ogTitleOverride = request.setAttribute("OG_TITLE_OVERRIDE", ogData.ogTitle.getData())>
95 <#else>
96 <#assign ogTitleOverride = request.setAttribute("OG_TITLE_OVERRIDE", .vars['reserved-article-title'].getData())>
97 </#if>
98 <#if ogData?? && ogData.ogDescription?? && ogData.ogDescription.getData()?has_content>
99 <#assign ogDescriptionOverride = request.setAttribute("OG_DESCRIPTION_OVERRIDE", ogData.ogDescription.getData())>
100 <#else>
101 <#if .vars['reserved-article-description'].getData()?has_content>
102 <#assign ogDescriptionOverride = request.setAttribute("OG_DESCRIPTION_OVERRIDE", .vars['reserved-article-description'].getData())>
103 </#if>
104 </#if>
105 <#if ogData?? && ogData.ogImage?? && ogData.ogImage.getData()?has_content>
106 <#attempt>
107 <#assign
108 ogImageUrlOverride = request.setAttribute("OG_IMAGE_URL_OVERRIDE", ogData.ogImage.getData())
109 imageMetadata = parsingService.getImageMetadata(ogData.ogImage.getAttribute("fileEntryId")?number)
110 >
111 <#if imageMetadata['height']??>
112 <#assign ogImageHeightOverride = request.setAttribute("OG_IMAGE_HEIGHT_OVERRIDE", imageMetadata['height'])>
113 </#if>
114 <#if imageMetadata['width']??>
115 <#assign ogImageWidthOverride = request.setAttribute("OG_IMAGE_WIDTH_OVERRIDE", imageMetadata['width'])>
116 </#if>
117 <#recover>
118 <!-- ERROR: failed to parse image ${ogData.ogImage.getData()} -->
119 </#attempt>
120 <#else>
121 <#attempt>
122 <#assign
123 ogImageUrlOverride = request.setAttribute("OG_IMAGE_URL_OVERRIDE", image.getData())
124 imageMetadata = parsingService.getImageMetadata(image.getAttribute("fileEntryId")?number)
125 >
126 <#if imageMetadata['height']??>
127 <#assign ogImageHeightOverride = request.setAttribute("OG_IMAGE_HEIGHT_OVERRIDE", imageMetadata['height'])>
128 </#if>
129 <#if imageMetadata['width']??>
130 <#assign ogImageWidthOverride = request.setAttribute("OG_IMAGE_WIDTH_OVERRIDE", imageMetadata['width'])>
131 </#if>
132 <#recover>
133 <!-- ERROR: failed to parse image ${image.getData()} -->
134 </#attempt>
135 </#if>
136
137 <div class="news-article">
138 <@articlelib.edit />
139 <div class="news-article-top-wrapper centered-content">
140 <h1 id="${companyId}_Top">${.vars['reserved-article-title'].getData()}</h1>
141 <div class="news-article-header">
142 <span class="news-article-date">${displayDate_formatted}</span>
143 <span class="header-separator">-</span>
144 <span class="news-article-themes">
145 <#list themaList as thema>
146 <#if thema?index != 0><span class="theme-separator">|</span></#if>
147 <a class="theme-link"
148 title="<@languageWithArguments key="idewe.news.theme.tooltip" arguments="${thema.getTitle(themeDisplay.getLocale())}" />"
149 href="${parentUrl}#${themeHashKey}=${thema.getTitle(themeDisplay.getLocale())?url('UTF-8')}">${thema.getTitle(themeDisplay.getLocale())}</a>
150 </#list>
151 </span>
152 </div>
153
154 <#if expert.getSiblings()?has_content>
155 <div class="news-article-expert-list row">
156 <#list expert.getSiblings() as cur_Expert>
157 <#attempt>
158 <#assign
159 expertData = newsArticleService.getExpertData(cur_Expert.getData(), groupId, themeDisplay.getLocale(), themeDisplay)
160 >
161 <#if expertData.name?has_content>
162 <div class="news-article-expert col-lg-6 col-md-6 col-sm-12">
163 <div class="news-article-expert-image">
164 <div class="news-article-expert-image-crop">
165 <img alt="${expertData.photoAlt}" src="${expertData.photoSrc}"/>
166 </div>
167 </div>
168 <div class="news-article-expert-details">
169 <p class="news-article-expert-details-name"><@liferay.language key="idewe.news.expert" /> ${expertData.prefix} ${expertData.name}</p>
170 <p>${expertData.function}</p>
171 </div>
172 </div>
173 </#if>
174 <#recover>
175 <!-- ERROR: failed to parse expert ${cur_Expert.getData()} -->
176 </#attempt>
177 </#list>
178 </div>
179 </#if>
180
181 <#if subTitle.getData()?has_content>
182 <h2>${subTitle.getData()}</h2>
183 </#if>
184 <p class="news-article-summary">${summary.getData()?replace('<p>','','r')?replace('</p>','','r')}</p>
185 <#if paragraph?has_content>
186 <#list paragraph.getSiblings() as paragraphItem>
187 <div id="par-${paragraphItem?index}" class="web-content-paragraph clearfix">
188 <h2 class="web-content-paragraph-title">${paragraphItem.paragraphTitle.getData()}</h2>
189 <#if paragraphItem.paragraphImage?? && paragraphItem.paragraphImage.paragraphImageAlignment?? && paragraphItem.paragraphImage.paragraphImageAlignment.getData() != "">
190 <#assign imageAlignment = paragraphItem.paragraphImage.paragraphImageAlignment.getData()>
191 <#else>
192 <#assign imageAlignment = "left">
193 </#if>
194 <#if paragraphItem.paragraphImage.paragraphImageFile?? && paragraphItem.paragraphImage.paragraphImageFile.getData() != "">
195 <#if paragraphItem.paragraphImage.paragraphImageWidth?? && paragraphItem.paragraphImage.paragraphImageWidth.getData() != "">
196 <#assign imageWidth = paragraphItem.paragraphImage.paragraphImageWidth.getData()>
197 <#else>
198 <#assign imageWidth = "full">
199 </#if>
200 <div class="web-content-paragraph-image alignment-${imageAlignment} width-${imageWidth} wow fadeIn">
201 <#if paragraphItem.paragraphImage.paragraphImageDownload?has_content && paragraphItem.paragraphImage.paragraphImageDownload.getData()?has_content>
202 <#assign
203 filePathArray = paragraphItem.paragraphImage.paragraphImageDownload.getData()?keep_before("?")?split("/")
204 fileEntry = fileEntryService.getFileEntryByUuidAndGroupId(filePathArray[5], filePathArray[2]?number)
205 fileExtension = fileEntry.getExtension()
206 fileSize = fileEntry.getSize()
207 >
208
209 <div class="dl-wrapper">
210 <a class="dl-link"
211 href="${paragraphItem.paragraphImage.paragraphImageDownload.getData()}"
212 target="_blank">
213 <span class="dl-overlay fa-stack fa-2x">
214 <i class="fas fa-circle fa-stack-2x dl-background"></i>
215 <i class="fas fa-download fa-stack-1x dl-icon"></i>
216 </span>
217 <span class="dl-text">(${fileExtension} - <@prettyPrintFileSize bytes="${fileSize?number}" />)</span>
218 </a>
219 </div>
220 </#if>
221
222 <img alt="${paragraphItem.paragraphImage.paragraphImageFile.getAttribute("alt")}"
223 src="${paragraphItem.paragraphImage.paragraphImageFile.getData()}"/>
224 </div>
225 </#if>
226 <div class="web-content-paragraph-content alignment-${imageAlignment}">${paragraphItem.paragraphContent.getData()}</div>
227 </div>
228 </#list>
229 </#if>
230 <#if download?has_content && download.getSiblings()?first.downloadFile.getData()?has_content>
231 <div class="news-article-downloads">
232 <h2 id="${companyId}_Downloads"><@liferay.language key="idewe.news.downloads" /></h2>
233 <ul class="news-article-downloads">
234 <#list download.getSiblings() as downloadItem>
235 <#if downloadItem.downloadTitle.getData()?has_content>
236 <#assign
237 filePathArray = downloadItem.downloadFile.getData()?keep_before("?")?split("/")
238 fileEntry = fileEntryService.getFileEntryByUuidAndGroupId(filePathArray[5], filePathArray[2]?number)
239 fileExtension = fileEntry.getExtension()
240 fileSize = fileEntry.getSize()
241 >
242 <li class="news-article-download ext-${fileExtension}">
243 <a href="${downloadItem.downloadFile.getData()}">${downloadItem.downloadTitle.getData()}</a>
244 <span class="news-article-download-details">(${fileExtension} - <@prettyPrintFileSize bytes="${fileSize?number}" />)</span>
245 </li>
246 </#if>
247 </#list>
248 </ul>
249 </div>
250 </#if>
251 </div>
252
253 <#assign
254 listSize = relatedNewsList?size
255 aantalCol1 = (listSize / 3)?ceiling
256 aantalCol2 = (listSize / 3)?round
257 aantalCol3 = (listSize / 3)?floor
258 >
259 <#if relatedNewsList?? && (listSize > 0)>
260 <div class="centered-content">
261 <div class="related-news row">
262 <div class="col-md-12"><h2><@liferay.language key="idewe.news.related" /></h2></div>
263 <#list relatedNewsList as relatedNewsArticle>
264 <#if relatedNewsArticle?index = 0
265 || relatedNewsArticle?index = aantalCol1
266 || relatedNewsArticle?index = aantalCol1 + aantalCol2>
267 <div class="col-md-4">
268 <ul>
269 </#if>
270 <li>
271 <i class="fa fa-angle-right"></i>
272 <a href="${relatedNewsArticle.getArticleUrl()}">${relatedNewsArticle.getTitle()}</a>
273 </li>
274 <#if relatedNewsArticle?index = aantalCol1 - 1
275 || relatedNewsArticle?index = aantalCol1 + aantalCol2 - 1
276 || relatedNewsArticle?index = listSize - 1>
277 </ul>
278 </div>
279 </#if>
280 </#list>
281 </div>
282 </div>
283 </#if>
284 </div>
285<#else>
286 <div class="content-language-error centered-content">
287 <!--<@liferay.language key="idewe.article.not.available.in.current.language" />-->
288 </div>
289 <script type="text/javascript">
290 jQuery(document).ready(function () {
291 window.location.replace("${overviewUrl}");
292 });
293 </script>
294</#if>
295<script type="text/javascript">
296 jQuery(document).ready(function () {
297 function fadeBox() {
298 jQuery('.fadeIn').each(function (i) {
299 var top_of_object = jQuery(this).position().top;
300 var bottom_of_window = jQuery(window).scrollTop() + jQuery(window).height();
301 if (top_of_object < bottom_of_window) {
302 jQuery(this).animate({'opacity': '1'}, 1500);
303 }
304 });
305 }
306
307 function scrollToTop() {
308 jQuery('html,body').scrollTop(0);
309 }
310
311 scrollToTop();
312 setTimeout(function () {
313 scrollToTop();
314 window.addEventListener("scroll", fadeBox);
315 fadeBox();
316 }, 200);
317 });
318</script>
Blijf altijd op de hoogte: schrijf je in op de IDEWE-nieuwsbrief
Met duiding van autonome experts, én in heldere taal!
Blijf mee met alle ontwikkelingen in welzijn & preventie
Ontvang als eerste updates rond wetswijzigingen