An error occurred while processing the template.
The following has evaluated to null or missing: ==> CurrentJournalArticle.getDisplayDate() [in template "20116#20152#33020" at line 67, column 24] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign displayDate = CurrentJournalA... [in template "20116#20152#33020" at line 67, column 1] ----
1<#--
2Web content templates are used to lay out the fields defined in a web
3content structure.
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 JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
10<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
11<#assign AssetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")>
12<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
13<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
14<#assign AssetCategoryPropertyLocalService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService")/>
15<#assign LayoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
16<#assign PortletPreferencesLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService")/>
17<#assign PropertyFactoryUtil = serviceLocator.findService("com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil") />
18<#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
19<#assign LayoutSetService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutSetLocalService")>
20<#assign DynamicQueryFactoryUtil = serviceLocator.findService("com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil") />
21<#assign virtualHostLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.VirtualHostLocalService") />
22<#assign TemplateCustomService = serviceLocator.findService("template.custom.services.TemplateCustomService") />
23<#assign ArticleTemplateCustomService = serviceLocator.findService("template.custom.services.ArticleTemplateCustomService") />
24
25<#assign
26serviceContextThreadLocal = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"]
27themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay()
28/>
29
30<#assign CurrentJournalArticle = JournalArticleLocalService.getLatestArticle(groupId,.vars['reserved-article-id'].data)>
31<#assign CurrentAssetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",CurrentJournalArticle.getResourcePrimKey())>
32<#assign AssetLinks=AssetLinkLocalService.getDirectLinks(CurrentAssetEntry.getEntryId()) >
33
34<#assign PropertyFactoryUtil = serviceLocator.findService("com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil") />
35
36<#-- update name here if change asset library name -->
37<#assign assetLibGroup = GroupLocalService.getGroup(themeDisplay.getCompanyId(), "Kearney Global Asset Library") />
38<#if assetLibGroup?? >
39 <#assign assetLibGroupId = assetLibGroup.getGroupId() />
40</#if>
41
42<#assign assetLinkOrder = CurrentJournalArticle.getExpandoBridge().getAttribute("Related Asset Ordering")!"" />
43
44<#-- ATK 40 changes start -->
45<#assign portletId = themeDisplay.getPortletDisplay().getId()>
46<#assign portletPreferencesXML = saxReaderUtil.read((PortletPreferencesLocalService.getPortletPreferences(themeDisplay.getPlid(), portletId)?first).getPreferences())>
47
48<#-- Macro used to get specific field text from an Asset Entry -->
49<#macro entryNode document field>
50 <#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??>
51 "${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}"
52 <#else>
53 ""
54 </#if>
55</#macro>
56
57<#-- Macro used to get specific portlet preference -->
58<#macro preference prefKey prefIndex defaultValue>
59 <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value")??>
60 "${portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value").getText()?js_string}"<#return>
61 <#else>
62 "${defaultValue?js_string}"<#return>
63 </#if>
64</#macro>
65<#-- ATK 40 changes end -->
66<#-- ATK-659 -->
67<#assign displayDate = CurrentJournalArticle.getDisplayDate()?date?string('MMMM dd, yyyy') />
68<#-- schema vars starts -->
69<#assign modifiedDate = CurrentJournalArticle.getModifiedDate()?date?string('yyyy-MM-dd') />
70<#assign displayDateForSchema = CurrentJournalArticle.getDisplayDate()?date?string('yyyy-MM-dd') />
71<#assign imageurlpartial = "" />
72<#assign imageurlschema = "" />
73<#assign currenturi = "" />
74<#if (ThumbnailSquare.getData())??>
75 <#if (ThumbnailSquare.getData())?contains("?")>
76 <#assign imageurlpartial = (ThumbnailSquare.getData())?keep_before("?") />
77 <#else>
78 <#assign imageurlpartial = ThumbnailSquare.getData() />
79 </#if>
80 <#assign imageurlschema = themeDisplay.getCDNBaseURL() + imageurlpartial />
81</#if>
82<#if themeDisplay.getURLCurrent()?has_content >
83 <#if (themeDisplay.getURLCurrent())?contains("?") >
84 <#assign currenturi = (themeDisplay.getURLCurrent())?keep_before("?") />
85 <#else>
86 <#assign currenturi = (themeDisplay.getURLCurrent()) />
87 </#if>
88</#if>
89<#assign pageurlcurrent = themeDisplay.getCDNBaseURL() + currenturi />
90<#assign answer =''>
91<#if Intro.getData()?has_content >
92 <#assign answer = Intro.getData()/>
93 <#else>
94 <#if Content.getSiblings()?has_content>
95 <#list Content.getSiblings() as cur_Content>
96 <#if (cur_Content.getData())??>
97 <#assign withouthtml = cur_Content.getData()?replace('<[^>]+>','','r') />
98 <#assign withouthtml = withouthtml?replace('\\n+','','r') />
99 <#assign withouthtml = withouthtml?replace('\\t+','','r') />
100 <#assign withouthtml = withouthtml?replace('\\r+','','r') />
101 <#assign withouthtml = withouthtml?replace(' ','','r') />
102 <#assign answer += withouthtml />
103 </#if>
104 </#list>
105 </#if>
106</#if>
107<#-- schema ends -->
108<div id="articleDiv">
109</div>
110
111<script>
112
113 var articleMetadata = {};
114 articleMetadata.slug = "${Slug.getData()?js_string}";
115 articleMetadata.articleTitle = "${ArticleTitle.getData()?js_string}";
116
117 <#if HeroImage??>
118 articleMetadata.heroImage = "${HeroImage.getData()?js_string}";
119 </#if>
120 <#if HeroMobile??>
121 articleMetadata.heroMobile = "${HeroMobile.getData()?js_string}";
122 </#if>
123
124 <#--
125 Set articleMetadata.publicTestArticle to restrict social sharing functionality to a single article.
126 Otherwise, leave commented to allow social sharing on all articles.
127 -->
128 <#--articleMetadata.publicTestArticle = 'test-article-url';-->
129
130
131 <#if SmallerTitle??>
132 articleMetadata.smallerTitle = ${getterUtil.getBoolean(SmallerTitle.getData())?c};
133 <#else>
134 articleMetadata.smallerTitle = false;
135 </#if>
136
137 articleMetadata.subtitle = "${Subtitle.getData()?js_string}";
138 articleMetadata.intro = "${Intro.getData()?js_string}";
139
140 <#if LandingPage??>
141 articleMetadata.landingPage = '${getterUtil.getBoolean(LandingPage.getData())?c}';
142 <#else>
143 articleMetadata.landingPage = false;
144 </#if>
145
146 <#if SocialLinks??>
147 articleMetadata.socialLinks = ${getterUtil.getBoolean(SocialLinks.getData())?c};
148 <#else>
149 articleMetadata.socialLinks = true;
150 </#if>
151
152 <#if GraySeparator??>
153 articleMetadata.graySeparator = ${getterUtil.getBoolean(GraySeparator.getData())?c};
154 <#else>
155 articleMetadata.graySeparator = false;
156 </#if>
157
158 <#if ShowParentBreadcrumb?? && LandingPage?? && getterUtil.getBoolean(LandingPage.getData()) == true>
159 articleMetadata.showParentBreadcrumb = ${getterUtil.getBoolean(ShowParentBreadcrumb.getData())?c}
160 <#else>
161 articleMetadata.showParentBreadcrumb = true;
162 </#if>
163
164 <#if BreadcrumbLabel??>
165 articleMetadata.parentBreadcrumbLabel = "${BreadcrumbLabel.getData()?js_string}";
166 </#if>
167
168 <#if BreadcrumbURL??>
169 articleMetadata.parentBreadcrumbURL = "${BreadcrumbURL.getData()?js_string}";
170 </#if>
171
172 <#if Byline??>
173 articleMetadata.byline = "${Byline.getData()?js_string}";
174 </#if>
175
176 <#if FeaturedContributor??>
177 articleMetadata.featuredContributor = "${FeaturedContributor.getData()}"
178 </#if>
179
180 <#if PostArticleSlideShareKey?? && PostArticleSlideShareKey.PostArticleSlideshareContent??>
181 articleMetadata.postArticleSlideshareKey = "${PostArticleSlideShareKey.getData()}"
182
183 articleMetadata.postArticleSlideshareContent = "${PostArticleSlideShareKey.PostArticleSlideshareContent.getData()}"
184 </#if>
185
186 <#if PDF??>
187 articleMetadata.pdf = "${PDF.getData()?js_string}"
188 <#else>
189 articleMetadata.pdf = "";
190 </#if>
191
192 var articleContents = [];
193 <#if Content.getSiblings()?has_content>
194 <#list Content.getSiblings() as cur_Content>
195
196 var images = [];
197
198 <#if cur_Content.PrimaryImage?has_content>
199 <#list cur_Content.PrimaryImage.getSiblings() as cur_PrimaryImage>
200
201 var image = {"imageURL": "${cur_PrimaryImage.getData()?js_string}"};
202
203 <#if cur_Content.PrimaryImage.SlideshowCaption??>
204 image["caption"] = "${cur_PrimaryImage.SlideshowCaption.getData()?js_string}";
205 </#if>
206
207 image["sharingEnabled"] = ${(cur_PrimaryImage.SharingEnabled?? && cur_PrimaryImage.SharingEnabled.getData() == "true")?c};
208
209 images.push(image);
210
211 </#list>
212 </#if>
213
214 articleContents.push({
215 <#if cur_Content.FeatureSlug??>
216 slug: "${cur_Content.FeatureSlug.getData()?js_string}",
217 </#if>
218 <#if cur_Content.TextAlignment??>
219 textAlignment: "${cur_Content.TextAlignment.getData()?js_string}",
220 </#if>
221 content: "${cur_Content.getData()?js_string}",
222 styling: "${cur_Content.stylingSelect.getData()?js_string}",
223 alternateText: "${cur_Content.AlternateText.getData()?js_string}",
224 primaryImage: images,
225 secondaryImage: "${cur_Content.SecondaryMaskImage.getData()?js_string}",
226 buttonText: "${cur_Content.ButtonText.getData()?js_string}",
227 buttonURL: "${cur_Content.ButtonURL.getData()?js_string}",
228 displayDate: "${displayDate}"
229 });
230
231
232 </#list>
233 </#if>
234
235 var bios = [];
236 <#assign articleGroup = GroupLocalService.getGroup(CurrentAssetEntry.getGroupId())
237 guestGroup = GroupLocalService.getFriendlyURLGroup(articleGroup.getCompanyId(), "/guest") />
238 <#--
239 Create list of groups that asset entries live in, so that linked bios can be retrieved by UUID
240 -->
241 <#assign assetLinkGroups = []>
242 <#if AssetLinks?has_content>
243 <#list AssetLinks as assetLink>
244 <#assign linkedAssetEntry = AssetEntryLocalService.getAssetEntry(assetLink.getEntryId2())>
245 <#assign assetLinkGroups = assetLinkGroups + [linkedAssetEntry.getGroupId()]>
246 </#list>
247 </#if>
248
249 //Create asset link ordering
250 var assetOrderArr = [];
251
252 <#list assetLinkOrder?split(",") as assetLinkUUID>
253 <#--
254 Find group which asset link is stored in and assign the resulting asset entry
255 -->
256 <#assign orderAssetEntry = "">
257
258 <#list assetLinkGroups as assetLinkGroupId>
259 <#assign orderAssetEntry = AssetEntryLocalService.fetchEntry(assetLinkGroupId, assetLinkUUID)!"">
260
261 <#if orderAssetEntry != "">
262 <#break />
263 </#if>
264 </#list>
265
266 <#if orderAssetEntry != "">
267 <#assign orderJournalArticle = JournalArticleLocalService.fetchLatestArticle(orderAssetEntry.getClassPK())!"">
268 <#if orderJournalArticle != "">
269 assetOrderArr.push("${orderJournalArticle.getArticleId()}");
270 </#if>
271 </#if>
272 </#list>
273
274 var assetOrderMap = {};
275
276 for(var order=1; order<assetOrderArr.length; order++) {
277 assetOrderMap[assetOrderArr[order-1]] = order;
278 }
279
280 var getAssetOrder = function(uuid) {
281 var order = assetOrderMap[uuid];
282 if(!order) {
283 order = Object.keys(assetOrderMap).length + 1;
284 assetOrderMap[uuid] = order;
285 }
286
287 return order;
288 };
289 <#assign authorlistschema = [] />
290 <#if Authors?? && Authors.getSiblings()?has_content>
291
292 var bioC =0;
293 <#list Authors.getSiblings() as cur_Authors>
294
295 <#if cur_Authors.getData() != "" >
296 <#assign cur_webContent_map = jsonFactoryUtil.createJSONObject(cur_Authors.getData())>
297 <#assign cur_webContent_classPK = cur_webContent_map.getString("classPK")>
298 <#if cur_webContent_classPK??>
299 <#if JournalArticleLocalService.fetchLatestArticle(cur_webContent_classPK?number)??>
300 <#assign articleK = JournalArticleLocalService.fetchLatestArticle(cur_webContent_classPK?number)>
301 <#assign articleKAssetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",articleK.getResourcePrimKey()) />
302
303 <#if articleKAssetEntry?? && articleKAssetEntry.getAssetRenderer()??>
304 <#assign xml = saxReaderUtil.read(articleKAssetEntry.getAssetRenderer().getArticle().getContentByLocale(themeDisplay.getLocale())) />
305
306
307
308 <#assign xml_fullName = xml.valueOf("//dynamic-element[@name='FullName']/dynamic-content/text()") />
309 <#assign xml_title = xml.valueOf("//dynamic-element[@name='Title']/dynamic-content/text()") />
310 <#assign xml_headshot = TemplateCustomService.getDocumentURL(xml,"CutoutHeadshot",themeDisplay)/>
311
312
313 var bio1 = {};
314 bio1.structureKey=('${articleK.getDDMStructure().getName("en_US")}');
315 bio1.weight= ++bioC;
316 bio1.fullName = '${xml_fullName}';
317 bio1.headshot = '${xml_headshot?js_string}';
318 bio1.title = '${xml_title}';
319 <#if (articleGroup.getLiveGroupId() != 0 ) >
320 <#assign articleK = JournalArticleLocalService.getArticleByUrlTitle(assetLibGroupId, articleK.getUrlTitle()) />
321 </#if>
322 <#assign viewURL = '' />
323
324 <#if articleK.getDDMStructure().getName("en_US") == "Bio Page">
325 <#assign viewURL = themeDisplay.getPortalURL() + "/about-us/our-people/bio/" + xml_fullName?lower_case?replace(" ", "-")/>
326 </#if>
327
328 bio1.bioURL = '${viewURL}';
329 bios.push(bio1);
330
331 <#assign viewURLschema = ''/>
332 <#if viewURL?has_content>
333 <#assign viewURLschema = viewURL />
334 </#if>
335 <#assign authordataschema = {"url":viewURLschema, "jobTitle":xml_title, "name":xml_fullName} />
336 <#assign authorlistschema = authorlistschema + [authordataschema] />
337 </#if>
338 </#if>
339 </#if>
340 </#if>
341
342 </#list>
343
344 </#if>
345
346 <#assign oldwaytogetauthourforschema = false>
347 <#if authorlistschema?size == 0>
348 <#assign oldwaytogetauthourforschema = true>
349 </#if>
350
351 if (bios.length == 0){
352 <#if AssetLinks?has_content>
353
354 <#list AssetLinks as assetLink>
355 <#assign linkedAssetEntry = AssetEntryLocalService.getAssetEntry(assetLink.getEntryId2())>
356 <#assign linkedJournalArticle = JournalArticleLocalService.getLatestArticle(linkedAssetEntry.getClassPK())>
357 <#assign xml = saxReaderUtil.read(linkedAssetEntry.getAssetRenderer().getArticle().getContentByLocale(themeDisplay.getLocale())) />
358 <#assign structureKey = linkedJournalArticle.getDDMStructure().getName("en_US") />
359
360 var bio = {};
361
362 <#assign xml_headshot = TemplateCustomService.getDocumentURL(xml,"CutoutHeadshot",themeDisplay)/>
363 <#if structureKey == "Bio Page" || structureKey == "Micro Bio" >
364 <#assign xml_fullName = xml.valueOf("//dynamic-element[@name='FullName']/dynamic-content/text()") />
365 <#assign xml_title = xml.valueOf("//dynamic-element[@name='Title']/dynamic-content/text()") />
366 bio.structureKey=('${structureKey}').trim();
367 bio.weight = getAssetOrder("${linkedJournalArticle.getArticleId()}");
368 bio.fullName = "${xml_fullName}";
369 bio.position = "${xml.valueOf("//dynamic-element[@name='Position']/dynamic-content/text()")?js_string}";
370 bio.title = "${xml_title?js_string}";
371 bio.headshot = "${xml_headshot?js_string}";
372 bio.description = "${xml.valueOf("//dynamic-element[@name='Description']/dynamic-content/text()")?js_string}";
373 bio.linkedInURL = "${xml.valueOf("//dynamic-element[@name='LinkedInURL']/dynamic-content/text()")?js_string}";
374
375 <#assign viewURL = '' />
376 <#if linkedJournalArticle.getDDMStructure().getName("en_US") == "Bio Page">
377 <#assign viewURL = themeDisplay.getPortalURL() + "/about-us/our-people/bio/" + xml_fullName?lower_case?replace(" ", "-")/>
378 </#if>
379
380 bio.bioURL = '${viewURL}';
381 bios.push(bio);
382
383 <#assign viewURLschema = ''/>
384 <#if viewURL?has_content>
385 <#assign viewURLschema = viewURL />
386 </#if>
387
388 <#if oldwaytogetauthourforschema>
389 <#assign authordataschema = {"url":viewURLschema, "jobTitle":xml_title, "name":xml_fullName} />
390 <#assign authorlistschema = authorlistschema + [authordataschema] />
391 </#if>
392 </#if>
393 </#list>
394
395 bios.sort(function(bio1, bio2){
396 return bio1.weight - bio2.weight;
397 });
398 </#if>
399
400 }
401 <#assign assetCategories = AssetCategoryLocalService.getAssetEntryAssetCategories(CurrentAssetEntry.getEntryId())>
402
403 var articleCategories = [];
404
405 <#list assetCategories as category>
406 <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())>
407 <#assign categoryUrl = "#">
408
409 <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty>
410
411 <#if categoryProperty.key == "url">
412 <#assign categoryUrl = categoryProperty.value>
413 </#if>
414 </#list>
415
416 articleCategories.push({
417 id: "${category.categoryId}",
418 name: "${category.name}",
419 url: "${categoryUrl}",
420 vocabularyName: "${categoryVocabulary.getName()?js_string}",
421 });
422 </#list>
423
424 articleMetadata.categories = articleCategories;
425 <#if LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false)??
426 && LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false).getThemeSetting("isMicroSite", "regular")?? >
427 <#assign isMicroSite = (LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
428 <#else>
429 <#assign isMicroSite = false>
430 </#if>
431
432 articleMetadata.isMicroSite = ${isMicroSite?c};
433 articleMetadata.groupName = "${articleGroup.getName("en_US")?js_string}";
434 articleMetadata.groupFriendlyUrl = "${articleGroup.getFriendlyURL()?js_string}";
435
436 <#if ReadMoreURL??>
437 articleMetadata.readMoreURL = "${ReadMoreURL.getData()?js_string}";
438 <#else>
439 articleMetadata.readMoreURL = "";
440 </#if>
441
442 <#if ReadMoreTextOverride??>
443 articleMetadata.readMoreTextOverride = "${ReadMoreTextOverride.getData()?js_string}";
444 <#else>
445 articleMetadata.readMoreTextOverride = "";
446 </#if>
447
448 <#if ContributorsTitleOverride??>
449 articleMetadata.contributorsTitleOverride = "${ContributorsTitleOverride.getData()?js_string}";
450 <#else>
451 articleMetadata.contributorsTitleOverride = "";
452 </#if>
453
454 <#if ReadMoreOverlay??>
455 articleMetadata.readMoreOverlay = ${getterUtil.getBoolean(ReadMoreOverlay.getData())?c}
456 <#else>
457 articleMetadata.readMoreOverlay = false;
458 </#if>
459
460 var sidebarContents = [];
461 <#assign enableSidebar = false>
462 <#if EnableSidebar??>
463 <#assign enableSidebar = getterUtil.getBoolean(EnableSidebar.getData())>
464 </#if>
465 <#-- Check if Sidebar is enabled or not -->
466 <#if enableSidebar == true>
467
468 <#assign listingOfArticles = false>
469 <#assign singleAssetWithImage = false>
470 <#assign richTextSection = false>
471 <#assign listView = false>
472 <#if EnableSidebar.ListingOfArticles??>
473 <#assign listingOfArticles = getterUtil.getBoolean(EnableSidebar.ListingOfArticles.getData())>
474 </#if>
475 <#if EnableSidebar.SingleAssetWithImage??>
476 <#assign singleAssetWithImage = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.getData())>
477 </#if>
478 <#if EnableSidebar.RichTextSection??>
479 <#assign richTextSection = getterUtil.getBoolean(EnableSidebar.RichTextSection.getData())>
480 </#if>
481 <#if EnableSidebar.ListView??>
482 <#assign listView = getterUtil.getBoolean(EnableSidebar.ListView.getData())>
483 </#if>
484 <#-- If Asset publisher listing of articles is enabled -->
485 <#if listingOfArticles == true>
486 <#assign listOfArticlesTitles = "Related">
487 <#if EnableSidebar.ListingOfArticles.ListingOfArticlesTitle.getData()?has_content>
488 <#assign listOfArticlesTitles = EnableSidebar.ListingOfArticles.ListingOfArticlesTitle.getData()>
489 </#if>
490 <#assign manualArticlesEntries = {}>
491 <#if EnableSidebar.ListingOfArticles.SelectSidebarArticles??>
492 <#assign manualArticlesEntries = ArticleTemplateCustomService.getManualArticleList(EnableSidebar.ListingOfArticles.SelectSidebarArticles.getSiblings())>
493 </#if>
494 var manualArticlesEntry = [];
495 <#if manualArticlesEntries?size > 0 >
496 <#list manualArticlesEntries as curEntry>
497 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
498 <#assign viewURL = TemplateCustomService.getSidebarArticleViewURL(themeDisplay,jArt,assetLibGroup)/>
499 var articleEntry = {"articleTitle": "${TemplateCustomService.getSidebarArticleTitle(themeDisplay,jArt,assetLibGroup)}","articleURL":"${viewURL}"};
500 manualArticlesEntry.push(articleEntry);
501 </#list>
502 <#else>
503 <#assign noOfFeatureArticle = "3">
504 <#if EnableSidebar.ListingOfArticles.NoOfArticlesDisplayed.getData() != "0">
505 <#assign noOfFeatureArticle = EnableSidebar.ListingOfArticles.NoOfArticlesDisplayed.getData()>
506 </#if>
507 <#assign manualArticlesEntries = ArticleTemplateCustomService.getRelatedArticles(CurrentAssetEntry.getEntryId(), noOfFeatureArticle, "Any")>
508 <#list manualArticlesEntries as curEntry>
509 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
510 <#assign viewURL = TemplateCustomService.getSidebarArticleViewURL(themeDisplay,jArt,assetLibGroup)/>
511 var articleEntry = {"articleTitle": "${TemplateCustomService.getSidebarArticleTitle(themeDisplay,jArt,assetLibGroup)}","articleURL":"${viewURL}"};
512 manualArticlesEntry.push(articleEntry);
513 </#list>
514 </#if>
515 sidebarContents.push({
516 listingOfArticlesTitle:"${listOfArticlesTitles}",
517 manualArticles:manualArticlesEntry,
518 componentType:"listingOfArticles"
519
520 });
521 </#if>
522 <#-- Single Asset Image article -->
523 <#if singleAssetWithImage == true>
524 <#assign learnMoreText = "Learn more">
525 <#assign enableTNSImage = true>
526 <#assign enableSlug = true>
527 <#if (EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.LearnMoreButtonText.getData())??>
528 <#assign learnMoreText = EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.LearnMoreButtonText.getData()/>
529 </#if>
530 <#if EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableTNSImage??>
531 <#assign enableTNSImage = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableTNSImage.getData())/>
532 </#if>
533 <#if EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableSlug??>
534 <#assign enableSlug = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableSlug.getData())>
535 </#if>
536 <#assign singleAssetArticleData = jsonFactoryUtil.createJSONObject(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.getData())/>
537 <#if singleAssetArticleData?has_content>
538 <#assign singleAssetArticle = ArticleTemplateCustomService.getManualArticle(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.getData())>
539 <#assign jArt = JournalArticleLocalService.getLatestArticle(singleAssetArticle.getClassPK())>
540 <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))>
541 <#assign structureName = jArt.getDDMStructure().getName("en_US")>
542 var componentType = "FEATURED_ARTICLE";
543 var title = <@entryNode document=document field="ArticleTitle"/>;
544 var subtitle = <@entryNode document=document field="Subtitle"/>;
545 var description = <@entryNode document=document field="Description"/>;
546 if (description == ""){
547 description = <@entryNode document=document field="Intro"/>;
548 }
549 var slug = <@entryNode document=document field="Slug"/>;
550 var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>;
551 if(linkTargetOverride == "" || linkTargetOverride == null){
552 linkTargetOverride = <@entryNode document=document field="LinkURL"/>;
553 }
554 <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())>
555 <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)??&& LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")??>
556 <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
557 <#else>
558 <#assign isMicroSite = false>
559 </#if>
560 var image = '${TemplateCustomService.getDocumentURL(document,"ThumbnailSquare",themeDisplay)}';
561 if (null == image || "" == image) {
562 image = '${TemplateCustomService.getDocumentURL(document,"Thumbnail",themeDisplay)}';
563 }
564 if (null == image) {
565 image = "";
566 }
567 var singleAssetComponent = {
568 slug: slug,
569 title: title,
570 subtitle: subtitle,
571 description: description,
572 image: image.trim(),
573 groupFriendlyUrl: '${articleGroup.getFriendlyURL()}',
574 isMicrosite: ${isMicroSite?c},
575 linkTargetOverride: linkTargetOverride
576 }
577 sidebarContents.push({
578 singleAssetData:singleAssetComponent,
579 componentType:"singleAsset",
580 learnMoreTextValue:'${learnMoreText}',
581 enableSlugValue:${enableSlug?c},
582 enableTNSImageValue:${enableTNSImage?c}
583 });
584 </#if>
585 </#if>
586 <#-- Rich Text Section -->
587 <#if richTextSection == true>
588 var richTextSectionData = [];
589 <#if EnableSidebar.RichTextSection.RichTextSectionContent.getSiblings()?has_content>
590 <#list EnableSidebar.RichTextSection.RichTextSectionContent.getSiblings() as richTextData>
591 <#if (richTextData.getData())??>
592 <#assign richTextSection = richTextData.getData()>
593 richTextSectionData.push({
594 richTextSectionContent: '${richTextSection?js_string}'
595 });
596 </#if>
597 </#list>
598 </#if>
599
600 sidebarContents.push({
601 richTextContentData : richTextSectionData,
602 componentType:"richTextContent"
603 });
604 </#if>
605 <#-- List View -->
606 <#if listView == true>
607 var listViewComponentData = [];
608 <#assign listViewTitle = "Related">
609 <#assign displayListViewTitle = false>
610 <#if (EnableSidebar.ListView.ListViewTitle.getData())??>
611 <#assign listViewTitle = EnableSidebar.ListView.ListViewTitle.getData()>
612 </#if>
613 <#if (EnableSidebar.ListView.ListViewTitle.getData())??>
614 <#assign displayListViewTitle = getterUtil.getBoolean(EnableSidebar.ListView.ListViewTitle.DisplayListViewTitle.getData())>
615 </#if>
616 <#if EnableSidebar.ListView.ListViewText.getSiblings()?has_content>
617 <#list EnableSidebar.ListView.ListViewText.getSiblings() as listViewData>
618 <#assign listView = listViewData.getData()>
619 <#assign listlink = listViewData.ListViewLink.getData()>
620 listViewComponentData.push({
621 listViewTitle: '${listView}',
622 listViewLink: '${listlink}',
623 });
624 </#list>
625 </#if>
626 sidebarContents.push({
627 listViewData:listViewComponentData,
628 componentType:"listView",
629 listViewTitleValue:'${listViewTitle}',
630 displayListViewTitleValue: ${displayListViewTitle?c}
631 });
632 </#if>
633
634 </#if>
635 ATK.React.App.Article('articleDiv', articleMetadata, articleContents, bios, sidebarContents);
636
637 // Run embedded scripts after article renders.
638 for (var i in articleContents) {
639
640 var re = /<script>(.+)<\/script>/gi;
641 var thisExtractedScript = ['', ''];
642
643 while (null != (thisExtractedScript = re.exec(articleContents[i].content))) {
644 window.eval(thisExtractedScript[1]);
645 }
646 }
647
648</script>
649<hr class="after-25-px-phone" style="width: 1000px; display: none;" id="hrfeatureArticle">
650<div id="articleAdtDiv_${portletId}" style="margin-top: 50px;margin-bottom: 50px;">
651</div>
652<script>
653<#assign enableRelatedInsights = false>
654
655<#if EnableRelatedInsights??>
656 <#assign enableRelatedInsights = getterUtil.getBoolean(EnableRelatedInsights.getData())>
657</#if>
658<#if enableRelatedInsights == true>
659
660<#assign multiArtBehavior = "Two Wide">
661<#assign gridTitle = "Related insights">
662<#assign noOfFeatureArticle = "2">
663<#assign featureDisplayType = "Image Left">
664
665<#assign fullWidthDisplay = "false">
666<#assign greyBackground = "false">
667<#assign extraSpacer = "None">
668<#assign seeAllLink = "">
669<#assign seeAllLinkText = "">
670<#assign greyBackground = "false">
671<#assign extraSpacer = "None">
672<#assign autoplay = "false">
673<#assign featureDisplayButtonType = "Visible">
674<#assign featureDisplayButtonText = "">
675
676<#if GridTitle??>
677 <#assign gridTitle = GridTitle.getData()>
678</#if>
679<#if gridTitle?has_content>
680<#else>
681 <#assign gridTitle = "Related insights">
682</#if>
683<#if MultipleArticleBehavior??>
684 <#assign multiArtBehavior = MultipleArticleBehavior.getData()>
685</#if>
686<#if multiArtBehavior?has_content>
687<#else>
688 <#assign multiArtBehavior = "Two Wide">
689</#if>
690<#if NoOfFeatureArticles??>
691 <#assign noOfFeatureArticle = NoOfFeatureArticles.getData()>
692</#if>
693<#if noOfFeatureArticle?has_content>
694<#else>
695 <#assign noOfFeatureArticle = "2">
696</#if>
697
698<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisTypeRelatedInsights']/value")??>
699 <#assign featureDisplayType = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisTypeRelatedInsights']/value").getText()?js_string>
700</#if>
701
702<#assign jaEntries = {}>
703<#if RelatedInsightsArticles??>
704 <#assign jaEntries = ArticleTemplateCustomService.getManualArticleList(RelatedInsightsArticles.getSiblings())>
705</#if>
706
707<#if jaEntries?size == 0 >
708 <#assign jaEntries = ArticleTemplateCustomService.getRelatedArticles(CurrentAssetEntry.getEntryId(), noOfFeatureArticle, "Any")>
709</#if>
710
711<#if jaEntries?size == 0 >
712 <#assign gridTitle = " ">
713<#else>
714 $('#hrfeatureArticle').css('display','block');
715</#if>
716
717var entries = [];
718 <#if jaEntries?size > 0 >
719 <#list jaEntries as curEntry>
720
721 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
722 <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))>
723
724 <#assign structureName = jArt.getDDMStructure().getName("en_US")>
725
726
727 var componentType = "FEATURED_ARTICLE";
728
729 var title = <@entryNode document=document field="ArticleTitle"/>;
730
731 var subtitle = <@entryNode document=document field="Subtitle"/>;
732
733 var description = <@entryNode document=document field="Description"/>;
734 if (description == ""){
735 description = <@entryNode document=document field="Intro"/>;
736 }
737
738 var slug = <@entryNode document=document field="Slug"/>;
739
740 <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())>
741
742 <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)??
743 && LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")?? >
744 <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
745 <#else>
746 <#assign isMicroSite = false>
747 </#if>
748
749 var image = '${TemplateCustomService.getDocumentURL(document,"ThumbnailSquare",themeDisplay)}';
750 if (null == image || "" == image || ${(fullWidthDisplay == "true")?c}) {
751 image = '${TemplateCustomService.getDocumentURL(document,"Thumbnail",themeDisplay)}';
752 }
753 if (null == image) {
754 image = "";
755 }
756
757 var componentData = {
758 locale: "${locale}",
759 structureName: "${structureName}",
760 displayType: "${featureDisplayType}",
761 slug: slug,
762 title: title,
763 subtitle: subtitle,
764 description: description,
765 image: image.trim(),
766 groupFriendlyUrl: '${articleGroup.getFriendlyURL()}',
767 isMicrosite: ${isMicroSite?c},
768 multiArtBehavior: '${multiArtBehavior}',
769 featureDisplayButtonText: '${featureDisplayButtonText}',
770 featureDisplayButtonType: '${featureDisplayButtonType}',
771 componentType: componentType
772 };
773 <#if structureName == "Article">
774
775 var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>;
776
777 if (linkTargetOverride !== ""){
778 componentData.link = linkTargetOverride;
779 } else {
780 <#assign assetCategories = AssetCategoryLocalService.getAssetEntryAssetCategories(curEntry.getEntryId())>
781
782 var articleCategories = [];
783
784 <#list assetCategories as category>
785 <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())>
786 <#assign categoryUrl = "#">
787
788 <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty>
789
790 <#if categoryProperty.key == "url">
791 <#assign categoryUrl = categoryProperty.value>
792 </#if>
793 </#list>
794
795 articleCategories.push({
796 id: "${category.categoryId}",
797 name: "${category.name}",
798 url: "${categoryUrl}",
799 vocabularyName: "${categoryVocabulary.getTitle(locale)}",
800 });
801
802 </#list>
803
804
805 componentData.categories = articleCategories;
806 componentData.urlTitle = "${jArt.getUrlTitle()?js_string}";
807 }
808
809 var byline = <@entryNode document=document field="Byline"/>;
810 if (byline != null && byline != ""){
811 componentData.byline = [];
812 };
813 </#if>
814 entries.push(componentData);
815 </#list>
816 </#if>
817
818var extraProps = {
819 multiArtBehavior: "${multiArtBehavior}",
820 gridTitle: "${gridTitle}",
821 fullWidthDisplay: "${fullWidthDisplay}",
822 greyBackground: "${greyBackground}",
823 extraSpacer: "${extraSpacer}",
824 seeAllLink: "${seeAllLink}",
825 seeAllLinkText: "${seeAllLinkText}"
826 };
827 ATK.React.Component.FeaturedMultiDisplay("articleAdtDiv_${portletId?js_string}", extraProps, entries);
828</#if>
829</script>
830
831<#compress>
832<#if Slug.getData()?lower_case == "article" >
833 <script id ="article-structured-data" type="application/ld+json">
834 {
835 "@context": "https://schema.org",
836 "@type": "Article",
837 "dateModified" : "${modifiedDate}",
838 "datePublished": "${displayDateForSchema}",
839 <#if (ArticleTitle.getData())?has_content>"headline": "${ArticleTitle.getData()?json_string}",</#if>
840 <#if answer?has_content>"description" : "${answer?json_string}",</#if>
841 <#if imageurlschema?has_content>"image" : "${imageurlschema}",</#if>
842 "mainEntityOfPage": {
843 "@type": "WebPage",
844 "@id": "${pageurlcurrent}"
845 },
846 "author" : [
847 <#if (authorlistschema?size > 0)>
848 <#list authorlistschema as author>
849 {
850 "@type" : "Person",
851 <#list author as cur_author_key, cur_author_value>
852 <#if cur_author_key=="url" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
853 <#if cur_author_key=="jobTitle" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
854 <#if cur_author_key=="name" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}"</#if>
855
856 </#list>
857 }<#if (author?index != (authorlistschema?size)-1)>,</#if>
858 </#list>
859 </#if>
860 ],
861 "publisher": {
862 "@type": "Organization",
863 "@id": "https://www.kearney.com#organization"
864 }
865 }
866 </script>
867<#elseif Slug.getData()?lower_case == "question and answer" >
868 <script id ="answer-structured-data" type="application/ld+json">
869 {
870 "@context": "https://schema.org",
871 "@type": "FAQPage",
872 "mainEntity": [{
873 "@type": "Question",
874 "name": "${ArticleTitle.getData()?json_string}",
875 "acceptedAnswer": {
876 "@type": "Answer",
877 <#if answer?has_content>"text" : "${answer?json_string}",</#if>
878 "author" : [
879 <#if (authorlistschema?size > 0)>
880 <#list authorlistschema as author>
881 {
882 "@type" : "Person",
883 <#list author as cur_author_key, cur_author_value>
884 <#if cur_author_key=="url" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
885 <#if cur_author_key=="jobTitle" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
886 <#if cur_author_key=="name" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}"</#if>
887
888 </#list>
889 }<#if (author?index != (authorlistschema?size)-1)>,</#if>
890 </#list>
891 </#if>
892 ]
893 }
894 }]
895 }
896 </script>
897 </#if>
898 </#compress>