Middle East - Health >Healthcare transformation
An error occurred while processing the template.
The following has evaluated to null or missing: ==> PortletPreferencesLocalService.getPortletPreferences(plid, portletId)?first [in template "20116#20152#33020" at line 279, column 39] ---- 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 portletPreferences = PortletP... [in template "20116#20152#33020" at line 279, column 9] ----
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<#-- ATK-1068 Styles Start -->
9<style>
10 @media (min-width: 1025px) {
11 .articleAdtDiv {
12 margin-top: -20px !important;
13 margin-bottom: 50px !important;
14 }
15}
16
17@media (max-width: 1024px) {
18 .articleAdtDiv {
19 margin-bottom: 50px !important;
20 }
21}
22</style>
23<#-- ATK-1068 Styles End -->
24<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() />
25<#assign themeDisplay = serviceContext.getThemeDisplay() />
26<#assign preview = false/>
27
28<#if (themeDisplay.getURLCurrent()?contains("preview_article_content.jsp")) || (themeDisplay.getURLCurrent()?contains("preview_article_content_template.jsp"))>
29 <#assign preview = true />
30
31 <script data-senna-track="permanent"
32 src="/o/atk-dot-com-theme/js/react/dist/vendor.bundle.js"></script>
33
34 <script data-senna-track="permanent"
35 src="/o/atk-dot-com-theme/js/react/dist/bundle.js"></script>
36
37 <style data-senna-track="temporary" type="text/css">
38 :root {
39 --container-max-sm: 576px;
40 --h4-font-size: 22px;
41 --font-weight-bold: 700;
42 --rounded-pill: 50rem;
43 --navigation-submenu-item-float: left;
44 --display4-weight: 300;
45 --danger: #da1414;
46 --atk-row: absolute;
47 --display2-size: 5.5rem;
48 --body-bg: #f9f9f9;
49 --display2-weight: 300;
50 --display1-weight: 300;
51 --display3-weight: 300;
52 --box-shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
53 --text-align-hero-text-container: center;
54 --cta-background-color: #F5F5F5;
55 --font-weight-lighter: lighter;
56 --h3-font-size: 36px;
57 --btn-outline-primary-hover-border-color: #0b5fff;
58 --transition-collapse: height .35s ease;
59 --blockquote-small-color: #6b6c7e;
60 --gray-200: #f1f2f5;
61 --btn-secondary-hover-background-color: #f7f8f9;
62 --gray-600: #6b6c7e;
63 --secondary: #6b6c7e;
64 --btn-outline-primary-color: #0b5fff;
65 --btn-link-hover-color: #004ad7;
66 --hr-border-color: rgba(0, 0, 0, .1);
67 --hr-border-margin-y: 1rem;
68 --light: #f1f2f5;
69 --btn-outline-primary-hover-color: #0b5fff;
70 --font-weight-read-more: 400;
71 --btn-secondary-background-color: #fff;
72 --btn-outline-secondary-hover-border-color: transparent;
73 --display3-size: 4.5rem;
74 --primary: #0b5fff;
75 --container-max-md: 768px;
76 --border-radius-sm: 0.1875rem;
77 --display-line-height: 1.2;
78 --font-family-hero-text: 'Graphik Web';
79 --h6-font-size: 0.8125rem;
80 --h2-font-size: 44px;
81 --aspect-ratio-4-to-3: 75%;
82 --font-family-read-more: 'Graphik Web';
83 --spacer-10: 10rem;
84 --font-family-semibold: 'Graphik Web';
85 --font-weight-normal: 400;
86 --dark: #272833;
87 --blockquote-small-font-size: 80%;
88 --h5-font-size: 0.875rem;
89 --blockquote-font-size: 1.25rem;
90 --transition-fade: opacity .15s linear;
91 --display4-size: 3.5rem;
92 --border-radius-lg: 0.375rem;
93 --btn-primary-hover-color: #fff;
94 --display1-size: 6rem;
95 --black: #000;
96 --gray-300: #e7e7ed;
97 --gray-700: #495057;
98 --btn-secondary-border-color: #cdced9;
99 --btn-outline-secondary-hover-color: #272833;
100 --purple: #7823DC;
101 --body-color: #111;
102 --btn-outline-secondary-hover-background-color: rgba(39, 40, 51, 0.03);
103 --font-weight-button-body: 400;
104 --btn-primary-color: #fff;
105 --btn-secondary-color: #6b6c7e;
106 --btn-secondary-hover-border-color: #cdced9;
107 --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);
108 --container-max-lg: 992px;
109 --btn-outline-primary-border-color: #0b5fff;
110 --aspect-ratio: 100%;
111 --cta-link-hover-color: #000;
112 --body-container: #fff;
113 --cta-link-color: #7823DC;
114 --aspect-ratio-16-to-9: 56.25%;
115 --box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
116 --white: #fff;
117 --portlet-bg-color: #272833;
118 --warning: #b95000;
119 --info: #2e5aac;
120 --hr-border-width: 1px;
121 --btn-link-color: #0b5fff;
122 --gray-400: #cdced9;
123 --font-weight-hero-text-h4: 100;
124 --gray-800: #393a4a;
125 --font-weight-semibold: 600;
126 --btn-outline-primary-hover-background-color: #f0f5ff;
127 --btn-primary-hover-background-color: #0053f0;
128 --btn-primary-background-color: #0b5fff;
129 --font-weight-heading4: 100;
130 --font-weight-hero-text-h1: 600;
131 --font-weight-heading3: 400;
132 --success: #287d3c;
133 --font-family-heading4: 'Graphik Web';
134 --font-family-heading3: 'Graphik Web';
135 --font-weight-heading2: 400;
136 --font-weight-heading1: 600;
137 --font-size-sm: 0.875rem;
138 --font-family-heading2: 'Graphik Web';
139 --btn-primary-border-color: #0b5fff;
140 --font-family-heading1: 'Graphik Web';
141 --font-family-base: 'Arabic', sans-serif;
142 --spacer-0: 0;
143 --font-family-monospace: 'Arabic', sans-serif;
144 --lead-font-size: 1.25rem;
145 --border-radius: 0.25rem;
146 --spacer-9: 9rem;
147 --font-weight-light: 300;
148 --btn-secondary-hover-color: #272833;
149 --spacer-2: 0.5rem;
150 --font-family-button-body: 'Graphik Web';
151 --spacer-1: 0.25rem;
152 --spacer-4: 1.5rem;
153 --spacer-3: 1rem;
154 --spacer-6: 4.5rem;
155 --spacer-5: 3rem;
156 --spacer-8: 7.5rem;
157 --border-radius-circle: 50%;
158 --spacer-7: 6rem;
159 --font-size-lg: 1.125rem;
160 --aspect-ratio-8-to-3: 37.5%;
161 --font-family-sans-serif: 'Arabic', sans-serif;
162 --gray-100: #f7f8f9;
163 --font-weight-bolder: 900;
164 --container-max-xl: 1280px;
165 --btn-outline-secondary-color: #6b6c7e;
166 --custom-black: #1E1E1E;
167 --gray-500: #a7a9bc;
168 --h1-font-size: 66px;
169 --gray-900: #272833;
170 --text-muted: #a7a9bc;
171 --btn-primary-hover-border-color: transparent;
172 --btn-outline-secondary-border-color: #cdced9;
173 --lead-font-weight: 300;
174 --font-size-base: 0.875rem;
175 }
176
177 .article-breadcrumb
178 a{
179 color: var(--purple) !important;
180 text-decoration: underline !important;
181 text-decoration-color: #E6E6E6 !important;
182 }
183
184 .article-figure
185 img{
186 max-width: 100% !important;
187 }
188
189 #articleDiv
190 {
191 word-wrap:break-word;
192 }
193
194 .buttonBodyContainer:hover
195 a{
196 color: #ffffff !important;
197 }
198
199 .black-to-garnet-author{
200 color: var(--custom-black) !important;
201 text-decoration: underline !important;
202 text-decoration-color: #E6E6E6 !important;
203 }
204
205 .article-square-bio:hover
206 a{
207 color: var(--purple) !important;
208 text-decoration: underline !important;
209 text-decoration-color: #E6E6E6 !important;
210 }
211
212 .atk-article
213 a{
214 color: var(--purple) !important;
215 text-decoration: underline !important;
216 text-decoration-color: #E6E6E6 !important;
217 }
218
219 .atk-article
220 a:hover{
221 text-decoration: none !important;
222 }
223 </style>
224
225</#if>
226
227<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
228<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
229<#--
2307.4 Upgrade start
231-->
232<#assign AssetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService")>
233<#--
2347.4 Upgrade end
235-->
236<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
237<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
238<#assign AssetCategoryPropertyLocalService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService")/>
239<#assign LayoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
240<#assign PortletPreferencesLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService")/>
241<#assign PropertyFactoryUtil = serviceLocator.findService("com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil") />
242<#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
243<#assign LayoutSetService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutSetLocalService")>
244<#assign DynamicQueryFactoryUtil = serviceLocator.findService("com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil") />
245<#assign virtualHostLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.VirtualHostLocalService") />
246<#assign TemplateCustomService = serviceLocator.findService("template.custom.services.TemplateCustomService") />
247<#assign ArticleTemplateCustomService = serviceLocator.findService("template.custom.services.ArticleTemplateCustomService") />
248
249<#assign
250serviceContextThreadLocal = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"]
251themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay()
252/>
253
254<#assign CurrentJournalArticle = JournalArticleLocalService.getLatestArticle(groupId,.vars['reserved-article-id'].data)>
255<#assign CurrentAssetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",CurrentJournalArticle.getResourcePrimKey())>
256<#assign AssetLinks=AssetLinkLocalService.getDirectLinks(CurrentAssetEntry.getEntryId()) >
257
258<#assign PropertyFactoryUtil = serviceLocator.findService("com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil") />
259
260<#-- update name here if change asset library name -->
261<#assign assetLibGroup = GroupLocalService.getGroup(themeDisplay.getCompanyId(), "Kearney Global Asset Library") />
262<#if assetLibGroup?? >
263 <#assign assetLibGroupId = assetLibGroup.getGroupId() />
264</#if>
265
266<#assign assetLinkOrder = CurrentJournalArticle.getExpandoBridge().getAttribute("Related Asset Ordering")!"" />
267
268<#--
2697.4 Upgrade start
270-->
271<#assign plid = themeDisplay.getPlid()>
272<#--
2737.4 Upgrade end
274-->
275<#if !(preview)>
276<#-- ATK 40 changes start -->
277 <#assign portletId = themeDisplay.getPortletDisplay().getId()>
278
279 <#assign portletPreferences = PortletPreferencesLocalService.getPortletPreferences(plid, portletId)?first />
280
281 <#assign preferences = PortletPreferencesLocalService.fetchPreferences(portletPreferences.getCompanyId(), portletPreferences.getOwnerId(), portletPreferences.getOwnerType(), plid, portletId) />
282
283<#-- Macro used to get specific field text from an Asset Entry -->
284<#macro entryNode document field>
285 <#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??>
286 "${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}"
287 <#else>
288 ""
289 </#if>
290</#macro>
291
292<#-- Macro used to get specific portlet preference -->
293<#macro preference prefKey prefIndex defaultValue>
294 <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value")??>
295 "${portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value").getText()?js_string}"<#return>
296 <#else>
297 "${defaultValue?js_string}"<#return>
298 </#if>
299</#macro>
300<#-- ATK 40 changes end -->
301</#if>
302
303<#if (preview)>
304<#-- ATK 40 changes start -->
305
306 <#assign portletId = (PortletPreferencesLocalService.getPortletPreferencesByPlid(themeDisplay.getPlid())?first).getPortletId() >
307
308 <#assign portletPreferences = PortletPreferencesLocalService.getPortletPreferences(plid, portletId)?first />
309
310 <#assign preferences = PortletPreferencesLocalService.fetchPreferences(portletPreferences.getCompanyId(), portletPreferences.getOwnerId(), portletPreferences.getOwnerType(), plid, portletId) />
311
312<#-- Macro used to get specific field text from an Asset Entry -->
313<#macro entryNode document field>
314 <#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??>
315 "${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}"
316 <#else>
317 ""
318 </#if>
319</#macro>
320
321<#-- Macro used to get specific portlet preference -->
322<#macro preference prefKey prefIndex defaultValue>
323 <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value")??>
324 "${portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value").getText()?js_string}"<#return>
325 <#else>
326 "${defaultValue?js_string}"<#return>
327 </#if>
328</#macro>
329<#-- ATK 40 changes end -->
330</#if>
331
332<#-- ATK-659 -->
333<#assign displayDate = "" />
334<#if CurrentJournalArticle.getDisplayDate()?has_content>
335 <#assign displayDate = CurrentJournalArticle.getDisplayDate()?date?string('MMMM dd, yyyy') />
336</#if>
337<#-- schema vars starts -->
338<#assign modifiedDate = "" />
339<#if CurrentJournalArticle.getModifiedDate()?has_content>
340 <#assign modifiedDate = CurrentJournalArticle.getModifiedDate()?date?string('yyyy-MM-dd') />
341</#if>
342<#assign displayDateForSchema = "" />
343<#if CurrentJournalArticle.getDisplayDate()?has_content>
344 <#assign displayDateForSchema = CurrentJournalArticle.getDisplayDate()?date?string('yyyy-MM-dd') />
345</#if>
346
347<#assign imageurlschema = "" />
348<#assign currenturi = "" />
349<#if (ThumbnailSquare.getData())??>
350 <#if (ThumbnailSquare.getData())?contains("?")>
351 <#assign imageurlschema = (ThumbnailSquare.getData())?keep_before("?") />
352 <#else>
353 <#assign imageurlschema = ThumbnailSquare.getData() />
354 </#if>
355
356</#if>
357<#if themeDisplay.getURLCurrent()?has_content >
358 <#if (themeDisplay.getURLCurrent())?contains("?") >
359 <#assign currenturi = (themeDisplay.getURLCurrent())?keep_before("?") />
360 <#else>
361 <#assign currenturi = (themeDisplay.getURLCurrent()) />
362 </#if>
363</#if>
364<#assign pageurlcurrent = themeDisplay.getCDNBaseURL() + currenturi />
365<#assign answer =''>
366<#if Intro.getData()?has_content >
367 <#assign answer = htmlUtil.unescape(Intro.getData())/>
368 <#else>
369 <#if Content.getSiblings()?has_content>
370 <#list Content.getSiblings() as cur_Content>
371 <#if (cur_Content.getData())??>
372 <#assign withouthtml = htmlUtil.unescape(cur_Content.getData())?replace('<[^>]+>','','r') />
373 <#assign withouthtml = withouthtml?replace('\\n+','','r') />
374 <#assign withouthtml = withouthtml?replace('\\t+','','r') />
375 <#assign withouthtml = withouthtml?replace('\\r+','','r') />
376 <#assign withouthtml = withouthtml?replace(' ','','r') />
377 <#assign answer += withouthtml />
378 </#if>
379 </#list>
380 </#if>
381</#if>
382<#-- schema ends -->
383<div id="articleDiv">
384</div>
385
386<script>
387
388 var articleMetadata = {};
389 articleMetadata.slug = "${(htmlUtil.unescape(Slug.getData()))?js_string}";
390 articleMetadata.articleTitle = "${(htmlUtil.unescape(ArticleTitle.getData()))?js_string}";
391
392 <#if HeroImage??>
393 articleMetadata.heroImage = "${HeroImage.getData()?js_string}";
394 </#if>
395 <#if HeroMobile??>
396 articleMetadata.heroMobile = "${HeroMobile.getData()?js_string}";
397 </#if>
398
399 <#--
400 Set articleMetadata.publicTestArticle to restrict social sharing functionality to a single article.
401 Otherwise, leave commented to allow social sharing on all articles.
402 -->
403 <#--articleMetadata.publicTestArticle = 'test-article-url';-->
404
405
406 <#if SmallerTitle??>
407 articleMetadata.smallerTitle = ${getterUtil.getBoolean(SmallerTitle.getData())?c};
408 <#else>
409 articleMetadata.smallerTitle = false;
410 </#if>
411
412 articleMetadata.subtitle = "${(htmlUtil.unescape(Subtitle.getData()))?js_string}";
413
414 <#assign introData = htmlUtil.unescape(Intro.getData())>
415 <#if !introData?contains("l2it-audio-player")>
416 <#if AddArticleAudio??>
417 <#assign addarticleaudio = getterUtil.getBoolean(AddArticleAudio.getData())>
418 <#else>
419 <#assign addarticleaudio = false>
420 </#if>
421 <#if addarticleaudio == true>
422 <#assign articleaudiotext = '<div id="l2it-audio-player"></div>' >
423 <#assign introData = introData + articleaudiotext>
424 </#if>
425 </#if>
426
427 articleMetadata.intro = "${introData?js_string}";
428
429 <#assign LandingArticle = false />
430 <#if LandingPage??>
431 articleMetadata.landingPage = '${getterUtil.getBoolean(LandingPage.getData())?c}';
432 <#assign LandingArticle = getterUtil.getBoolean(LandingPage.getData()) />
433 <#else>
434 articleMetadata.landingPage = false;
435 </#if>
436
437 <#if SocialLinks??>
438 <#if SocialLinks.getData() == "">
439 articleMetadata.socialLinks = true;
440 <#else>
441 articleMetadata.socialLinks = ${getterUtil.getBoolean(SocialLinks.getData())?c};
442 </#if>
443 <#else>
444 articleMetadata.socialLinks = false;
445 </#if>
446
447 <#if GraySeparator??>
448 <#if GraySeparator.getData() == "">
449 articleMetadata.graySeparator = true;
450 <#else>
451 articleMetadata.graySeparator = ${getterUtil.getBoolean(GraySeparator.getData())?c};
452 </#if>
453 <#else>
454 articleMetadata.graySeparator = false;
455 </#if>
456
457 <#if ShowParentBreadcrumb?? && LandingPage?? && getterUtil.getBoolean(LandingPage.getData()) == true>
458 articleMetadata.showParentBreadcrumb = ${getterUtil.getBoolean(ShowParentBreadcrumb.getData())?c}
459 <#else>
460 articleMetadata.showParentBreadcrumb = true;
461 </#if>
462
463 <#if BreadcrumbLabel??>
464 articleMetadata.parentBreadcrumbLabel = "${(htmlUtil.unescape(BreadcrumbLabel.getData()))?js_string}";
465 </#if>
466
467 <#if BreadcrumbURL??>
468 articleMetadata.parentBreadcrumbURL = "${BreadcrumbURL.getData()?js_string}";
469 </#if>
470
471 <#if Byline??>
472 articleMetadata.byline = "${(htmlUtil.unescape(Byline.getData()))?js_string}";
473 </#if>
474
475 <#if FeaturedContributor??>
476 articleMetadata.featuredContributor = "${htmlUtil.unescape(FeaturedContributor.getData())}"
477 </#if>
478
479 <#-- Removed as of ATK-1208 -- No longer needed -- Legacy -->
480 <#--
481 <#if PostArticleSlideShareKey?? && PostArticleSlideShareKey.PostArticleSlideshareContent??>
482 articleMetadata.postArticleSlideshareKey = "${PostArticleSlideShareKey.getData()}"
483
484 articleMetadata.postArticleSlideshareContent = "${PostArticleSlideShareKey.PostArticleSlideshareContent.getData()}"
485 </#if>
486 -->
487
488 <#if PDF??>
489 articleMetadata.pdf = "${PDF.getData()?js_string}"
490 <#else>
491 articleMetadata.pdf = "";
492 </#if>
493
494 var articleContents = [];
495 <#if Content.getSiblings()?has_content>
496 <#list Content.getSiblings() as cur_Content>
497
498 var images = [];
499
500 <#if cur_Content.PrimaryImage?has_content>
501 <#list cur_Content.PrimaryImage.getSiblings() as cur_PrimaryImage>
502
503 var image = {"imageURL": "${cur_PrimaryImage.getData()?js_string}"};
504
505 <#if cur_Content.PrimaryImage.SlideshowCaption??>
506 image["caption"] = "${(htmlUtil.unescape(cur_PrimaryImage.SlideshowCaption.getData()))?js_string}";
507 </#if>
508
509 image["sharingEnabled"] = ${(cur_PrimaryImage.SharingEnabled?? && cur_PrimaryImage.SharingEnabled.getData() == "true")?c};
510
511 images.push(image);
512
513 </#list>
514 </#if>
515
516 articleContents.push({
517 <#if cur_Content.FeatureSlug??>
518 slug: "${cur_Content.FeatureSlug.getData()?js_string}",
519 </#if>
520 <#if cur_Content.TextAlignment??>
521 textAlignment: "${cur_Content.TextAlignment.getData()?js_string}",
522 </#if>
523 content: "${(htmlUtil.unescape(cur_Content.getData()))?js_string}",
524 styling: "${cur_Content.stylingSelect.getData()?js_string}",
525 alternateText: "${(htmlUtil.unescape(cur_Content.AlternateText.getData()))?js_string}",
526 primaryImage: images,
527 secondaryImage: "${cur_Content.SecondaryMaskImage.getData()?js_string}",
528 buttonText: "${(htmlUtil.unescape(cur_Content.ButtonText.getData()))?js_string}",
529 buttonURL: "${cur_Content.ButtonURL.getData()?js_string}",
530 displayDate: "${displayDate}"
531 });
532
533
534 </#list>
535 </#if>
536
537 var bios = [];
538 <#assign articleGroup = GroupLocalService.getGroup(CurrentAssetEntry.getGroupId())
539 guestGroup = GroupLocalService.getFriendlyURLGroup(articleGroup.getCompanyId(), "/guest") />
540 <#--
541 Create list of groups that asset entries live in, so that linked bios can be retrieved by UUID
542 -->
543 <#assign assetLinkGroups = []>
544 <#if AssetLinks?has_content>
545 <#list AssetLinks as assetLink>
546 <#assign linkedAssetEntry = AssetEntryLocalService.getAssetEntry(assetLink.getEntryId2())>
547 <#assign assetLinkGroups = assetLinkGroups + [linkedAssetEntry.getGroupId()]>
548 </#list>
549 </#if>
550
551 //Create asset link ordering
552 var assetOrderArr = [];
553
554 <#list assetLinkOrder?split(",") as assetLinkUUID>
555 <#--
556 Find group which asset link is stored in and assign the resulting asset entry
557 -->
558 <#assign orderAssetEntry = "">
559
560 <#list assetLinkGroups as assetLinkGroupId>
561 <#assign orderAssetEntry = AssetEntryLocalService.fetchEntry(assetLinkGroupId, assetLinkUUID)!"">
562
563 <#if orderAssetEntry != "">
564 <#break />
565 </#if>
566 </#list>
567
568 <#if orderAssetEntry != "">
569 <#assign orderJournalArticle = JournalArticleLocalService.fetchLatestArticle(orderAssetEntry.getClassPK())!"">
570 <#if orderJournalArticle != "">
571 assetOrderArr.push("${orderJournalArticle.getArticleId()}");
572 </#if>
573 </#if>
574 </#list>
575
576 var assetOrderMap = {};
577
578 for(var order=1; order<assetOrderArr.length; order++) {
579 assetOrderMap[assetOrderArr[order-1]] = order;
580 }
581
582 var getAssetOrder = function(uuid) {
583 var order = assetOrderMap[uuid];
584 if(!order) {
585 order = Object.keys(assetOrderMap).length + 1;
586 assetOrderMap[uuid] = order;
587 }
588
589 return order;
590 };
591 <#assign authorlistschema = [] />
592 <#if Authors?? && Authors.getSiblings()?has_content>
593
594 var bioC =0;
595 <#list Authors.getSiblings() as cur_Authors>
596
597 <#if cur_Authors.getData() != "" >
598 <#assign cur_webContent_map = jsonFactoryUtil.createJSONObject(cur_Authors.getData())>
599 <#assign cur_webContent_classPK = cur_webContent_map.getString("classPK")>
600 <#if cur_webContent_classPK??>
601 <#if JournalArticleLocalService.fetchLatestArticle(cur_webContent_classPK?number)??>
602 <#assign articleK = JournalArticleLocalService.fetchLatestArticle(cur_webContent_classPK?number)>
603 <#assign articleKAssetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",articleK.getResourcePrimKey()) />
604
605 <#if articleKAssetEntry?? && articleKAssetEntry.getAssetRenderer()??>
606 <#assign xml = saxReaderUtil.read(articleKAssetEntry.getAssetRenderer().getArticle().getContentByLocale(themeDisplay.getLocale())) />
607
608
609
610 <#assign xml_fullName = xml.valueOf("//dynamic-element[@name='FullName']/dynamic-content/text()") />
611 <#assign xml_title = xml.valueOf("//dynamic-element[@name='Title']/dynamic-content/text()") />
612 <#assign xml_headshot = TemplateCustomService.getDocumentURL(xml,"CutoutHeadshot",themeDisplay)/>
613 <#if xml_headshot?contains("&download=")>
614 <#assign xml_headshot = xml_headshot?keep_before("&download=")>
615 </#if>
616
617
618 var bio1 = {};
619 bio1.structureKey=('${articleK.getDDMStructure().getName("en_US")}');
620 bio1.weight= ++bioC;
621 bio1.fullName = '${xml_fullName}';
622 bio1.headshot = '${xml_headshot?js_string}';
623 bio1.title = '${xml_title}';
624 <#if (articleGroup.getLiveGroupId() != 0 ) >
625 <#assign articleK = JournalArticleLocalService.getArticleByUrlTitle(assetLibGroupId, articleK.getUrlTitle()) />
626 </#if>
627 <#assign viewURL = '' />
628
629 <#if articleK.getDDMStructure().getName("en_US") == "Bio Page">
630 <#assign viewURL = TemplateCustomService.getArticleViewURL(articleK.getArticleId(),assetLibGroup,articleK.getGroupId(),themeDisplay,guestGroup.getGroupId())/>
631 <#if !(viewURL?has_content)>
632 <#assign viewURL = themeDisplay.getPortalURL() + "/about/people/bio/" + xml_fullName?lower_case?replace(" ", "-")/>
633 </#if>
634 </#if>
635
636 bio1.bioURL = '${viewURL}';
637 bios.push(bio1);
638
639 <#assign viewURLschema = ''/>
640 <#if viewURL?has_content>
641 <#assign viewURLschema = viewURL />
642 </#if>
643 <#assign authordataschema = {"url":viewURLschema, "jobTitle":xml_title, "name":xml_fullName} />
644 <#assign authorlistschema = authorlistschema + [authordataschema] />
645 </#if>
646 </#if>
647 </#if>
648 </#if>
649
650 </#list>
651
652 </#if>
653
654 <#assign oldwaytogetauthourforschema = false>
655 <#if authorlistschema?size == 0>
656 <#assign oldwaytogetauthourforschema = true>
657 </#if>
658
659 if (bios.length == 0){
660 <#if AssetLinks?has_content>
661
662 <#list AssetLinks as assetLink>
663 <#assign linkedAssetEntry = AssetEntryLocalService.getAssetEntry(assetLink.getEntryId2())>
664 <#assign linkedJournalArticle = JournalArticleLocalService.getLatestArticle(linkedAssetEntry.getClassPK())>
665 <#assign xml = saxReaderUtil.read(linkedAssetEntry.getAssetRenderer().getArticle().getContentByLocale(themeDisplay.getLocale())) />
666 <#assign structureKey = linkedJournalArticle.getDDMStructure().getName("en_US") />
667
668 var bio = {};
669
670 <#assign xml_headshot = TemplateCustomService.getDocumentURL(xml,"CutoutHeadshot",themeDisplay)/>
671 <#if xml_headshot?contains("&download=")>
672 <#assign xml_headshot = xml_headshot?keep_before("&download=")>
673 </#if>
674 <#if structureKey == "Bio Page" || structureKey == "Micro Bio" >
675 <#assign xml_fullName = xml.valueOf("//dynamic-element[@name='FullName']/dynamic-content/text()") />
676 <#assign xml_title = xml.valueOf("//dynamic-element[@name='Title']/dynamic-content/text()") />
677 bio.structureKey=('${structureKey}').trim();
678 bio.weight = getAssetOrder("${linkedJournalArticle.getArticleId()}");
679 bio.fullName = "${xml_fullName}";
680 bio.position = "${xml.valueOf("//dynamic-element[@name='Position']/dynamic-content/text()")?js_string}";
681 bio.title = "${xml_title?js_string}";
682 bio.headshot = "${xml_headshot?js_string}";
683 bio.description = "${xml.valueOf("//dynamic-element[@name='Description']/dynamic-content/text()")?js_string}";
684 bio.linkedInURL = "${xml.valueOf("//dynamic-element[@name='LinkedInURL']/dynamic-content/text()")?js_string}";
685
686 <#assign viewURL = '' />
687 <#if linkedJournalArticle.getDDMStructure().getName("en_US") == "Bio Page">
688 <#assign viewURL = themeDisplay.getPortalURL() + "/about/people/bio/" + xml_fullName?lower_case?replace(" ", "-")/>
689 </#if>
690
691 bio.bioURL = '${viewURL}';
692 bios.push(bio);
693
694 <#assign viewURLschema = ''/>
695 <#if viewURL?has_content>
696 <#assign viewURLschema = viewURL />
697 </#if>
698
699 <#if oldwaytogetauthourforschema>
700 <#assign authordataschema = {"url":viewURLschema, "jobTitle":xml_title, "name":xml_fullName} />
701 <#assign authorlistschema = authorlistschema + [authordataschema] />
702 </#if>
703 </#if>
704 </#list>
705
706 bios.sort(function(bio1, bio2){
707 return bio1.weight - bio2.weight;
708 });
709 </#if>
710
711 }
712 <#assign assetCategories = AssetCategoryLocalService.getCategories(CurrentAssetEntry.getClassNameId(), CurrentAssetEntry.getClassPK())>
713
714 var articleCategories = [];
715
716 <#list assetCategories as category>
717 <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())>
718 <#assign categoryUrl = "#">
719
720 <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty>
721
722 <#if categoryProperty.key == "url">
723 <#assign categoryUrl = categoryProperty.value>
724 </#if>
725 </#list>
726
727 articleCategories.push({
728 id: "${category.categoryId}",
729 name: "${category.name}",
730 url: "${categoryUrl}",
731 vocabularyName: "${categoryVocabulary.getName()?js_string}",
732 });
733 </#list>
734
735 articleMetadata.categories = articleCategories;
736 <#if LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false)??
737 && LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false).getThemeSetting("isMicroSite", "regular")?? >
738 <#assign isMicroSite = (LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
739 <#else>
740 <#assign isMicroSite = false>
741 </#if>
742
743 articleMetadata.isMicroSite = ${isMicroSite?c};
744 articleMetadata.groupName = "${articleGroup.getName("en_US")?js_string}";
745 articleMetadata.groupFriendlyUrl = "${articleGroup.getFriendlyURL()?js_string}";
746
747 <#if ReadMoreURL??>
748 articleMetadata.readMoreURL = "${ReadMoreURL.getData()?js_string}";
749 <#else>
750 articleMetadata.readMoreURL = "";
751 </#if>
752
753 <#if ReadMoreTextOverride??>
754 articleMetadata.readMoreTextOverride = "${(htmlUtil.unescape(ReadMoreTextOverride.getData()))?js_string}";
755 <#else>
756 articleMetadata.readMoreTextOverride = "";
757 </#if>
758
759 <#if ContributorsTitleOverride??>
760 articleMetadata.contributorsTitleOverride = "${(htmlUtil.unescape(ContributorsTitleOverride.getData()))?js_string}";
761 <#else>
762 articleMetadata.contributorsTitleOverride = "";
763 </#if>
764
765 <#if ReadMoreOverlay??>
766 articleMetadata.readMoreOverlay = ${getterUtil.getBoolean(ReadMoreOverlay.getData())?c}
767 <#else>
768 articleMetadata.readMoreOverlay = false;
769 </#if>
770
771 var sidebarContents = [];
772 <#assign enableSidebar = false>
773 <#if EnableSidebar??>
774 <#assign enableSidebar = getterUtil.getBoolean(EnableSidebar.getData())>
775 </#if>
776 <#-- Check if Sidebar is enabled or not -->
777 <#if enableSidebar == true>
778
779 <#assign listingOfArticles = false>
780 <#assign singleAssetWithImage = false>
781 <#assign richTextSection = false>
782 <#assign listView = false>
783 <#if EnableSidebar.ListingOfArticles??>
784 <#assign listingOfArticles = getterUtil.getBoolean(EnableSidebar.ListingOfArticles.getData())>
785 </#if>
786 <#if EnableSidebar.SingleAssetWithImage??>
787 <#assign singleAssetWithImage = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.getData())>
788 </#if>
789 <#if EnableSidebar.RichTextSection??>
790 <#assign richTextSection = getterUtil.getBoolean(EnableSidebar.RichTextSection.getData())>
791 </#if>
792 <#if EnableSidebar.ListView??>
793 <#assign listView = getterUtil.getBoolean(EnableSidebar.ListView.getData())>
794 </#if>
795
796 <#-- If Asset publisher listing of articles is enabled -->
797 <#if listingOfArticles == true>
798 <#assign listOfArticlesTitles = "Related">
799 <#if EnableSidebar.ListingOfArticles.ListingOfArticlesTitle.getData()?has_content>
800 <#assign listOfArticlesTitles = htmlUtil.unescape(EnableSidebar.ListingOfArticles.ListingOfArticlesTitle.getData())>
801 </#if>
802 <#assign manualArticlesEntries = {}>
803 <#if EnableSidebar.ListingOfArticles.SelectSidebarArticles??>
804 <#assign manualArticlesEntries = ArticleTemplateCustomService.getManualArticleList(EnableSidebar.ListingOfArticles.SelectSidebarArticles.getSiblings())>
805 </#if>
806 var manualArticlesEntry = [];
807 <#if manualArticlesEntries?size > 0 >
808 <#list manualArticlesEntries as curEntry>
809 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
810 <#assign viewURL = TemplateCustomService.getSidebarArticleViewURL(themeDisplay,jArt,assetLibGroup)/>
811 var articleEntry = {"articleTitle": "${TemplateCustomService.getSidebarArticleTitle(themeDisplay,jArt,assetLibGroup)}","articleURL":"${viewURL}"};
812 manualArticlesEntry.push(articleEntry);
813 </#list>
814 <#else>
815 <#assign noOfFeatureArticle = "3">
816 <#if EnableSidebar.ListingOfArticles.NoOfArticlesDisplayed.getData() != "0">
817 <#assign noOfFeatureArticle = EnableSidebar.ListingOfArticles.NoOfArticlesDisplayed.getData()>
818 </#if>
819 <#assign manualArticlesEntries = ArticleTemplateCustomService.getRelatedArticles(CurrentAssetEntry.getEntryId(), CurrentAssetEntry.getClassTypeId(), noOfFeatureArticle, "Any")>
820 <#list manualArticlesEntries as curEntry>
821 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
822 <#assign viewURL = TemplateCustomService.getSidebarArticleViewURL(themeDisplay,jArt,assetLibGroup)/>
823 var articleEntry = {"articleTitle": "${TemplateCustomService.getSidebarArticleTitle(themeDisplay,jArt,assetLibGroup)}","articleURL":"${viewURL}"};
824 manualArticlesEntry.push(articleEntry);
825 </#list>
826 </#if>
827 sidebarContents.push({
828 listingOfArticlesTitle:"${listOfArticlesTitles}",
829 manualArticles:manualArticlesEntry,
830 componentType:"listingOfArticles"
831
832 });
833 </#if>
834 <#-- Single Asset Image article -->
835 <#if singleAssetWithImage == true>
836 <#assign learnMoreText = "Learn more">
837 <#assign enableTNSImage = true>
838 <#assign enableSlug = true>
839 <#if (EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.LearnMoreButtonText.getData())??>
840 <#assign learnMoreText = htmlUtil.unescape(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.LearnMoreButtonText.getData())/>
841 </#if>
842 <#if EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableTNSImage??>
843 <#assign enableTNSImage = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableTNSImage.getData())/>
844 </#if>
845 <#if EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableSlug??>
846 <#assign enableSlug = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableSlug.getData())>
847 </#if>
848 <#assign singleAssetArticleData = jsonFactoryUtil.createJSONObject(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.getData())/>
849 <#if singleAssetArticleData?has_content>
850 <#assign singleAssetArticle = ArticleTemplateCustomService.getManualArticle(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.getData())>
851 <#assign jArt = JournalArticleLocalService.getLatestArticle(singleAssetArticle.getClassPK())>
852 <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))>
853 <#assign structureName = jArt.getDDMStructure().getName("en_US")>
854 var componentType = "FEATURED_ARTICLE";
855 var title = <@entryNode document=document field="ArticleTitle"/>;
856 var subtitle = <@entryNode document=document field="Subtitle"/>;
857 var description = <@entryNode document=document field="Description"/>;
858 if (description == ""){
859 description = <@entryNode document=document field="Intro"/>;
860 }
861 var slug = <@entryNode document=document field="Slug"/>;
862 var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>;
863 if(linkTargetOverride == "" || linkTargetOverride == null){
864 linkTargetOverride = <@entryNode document=document field="LinkURL"/>;
865 }
866 <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())>
867 <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)??&& LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")??>
868 <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
869 <#else>
870 <#assign isMicroSite = false>
871 </#if>
872 var image = '${TemplateCustomService.getDocumentURL(document,"ThumbnailSquare",themeDisplay)}';
873 if (null == image || "" == image) {
874 image = '${TemplateCustomService.getDocumentURL(document,"Thumbnail",themeDisplay)}';
875 }
876 if (null == image) {
877 image = "";
878 }
879 var singleAssetComponent = {
880 slug: slug,
881 title: title,
882 subtitle: subtitle,
883 description: description,
884 image: image.trim(),
885 groupFriendlyUrl: '${articleGroup.getFriendlyURL()}',
886 isMicrosite: ${isMicroSite?c},
887 linkTargetOverride: linkTargetOverride
888 }
889 sidebarContents.push({
890 singleAssetData:singleAssetComponent,
891 componentType:"singleAsset",
892 learnMoreTextValue:'${learnMoreText}',
893 enableSlugValue:${enableSlug?c},
894 enableTNSImageValue:${enableTNSImage?c}
895 });
896 </#if>
897 </#if>
898 <#-- Rich Text Section -->
899 <#if richTextSection == true>
900 var richTextSectionData = [];
901 <#if EnableSidebar.RichTextSection.RichTextSectionContent.getSiblings()?has_content>
902 <#list EnableSidebar.RichTextSection.RichTextSectionContent.getSiblings() as richTextData>
903 <#if (richTextData.getData())??>
904 <#assign richTextSection = richTextData.getData()>
905 richTextSectionData.push({
906 richTextSectionContent: '${richTextSection?js_string}'
907 });
908 </#if>
909 </#list>
910 </#if>
911
912 sidebarContents.push({
913 richTextContentData : richTextSectionData,
914 componentType:"richTextContent"
915 });
916 </#if>
917 <#-- List View -->
918 <#if listView == true>
919 var listViewComponentData = [];
920 <#assign listViewTitle = "Related">
921 <#assign displayListViewTitle = false>
922 <#if (EnableSidebar.ListView.ListViewTitle.getData())??>
923 <#assign listViewTitle = htmlUtil.unescape(EnableSidebar.ListView.ListViewTitle.getData())>
924 </#if>
925 <#if (EnableSidebar.ListView.ListViewTitle.getData())??>
926 <#assign displayListViewTitle = getterUtil.getBoolean(EnableSidebar.ListView.ListViewTitle.DisplayListViewTitle.getData())>
927 </#if>
928 <#if EnableSidebar.ListView.ListViewText.getSiblings()?has_content>
929 <#list EnableSidebar.ListView.ListViewText.getSiblings() as listViewData>
930 <#assign listView = htmlUtil.unescape(listViewData.getData())>
931 <#assign listlink = listViewData.ListViewLink.getData()>
932 listViewComponentData.push({
933 listViewTitle: '${listView}',
934 listViewLink: '${listlink}',
935 });
936 </#list>
937 </#if>
938 sidebarContents.push({
939 listViewData:listViewComponentData,
940 componentType:"listView",
941 listViewTitleValue:'${listViewTitle}',
942 displayListViewTitleValue: ${displayListViewTitle?c}
943 });
944 </#if>
945
946 <#-- Web content with Link Structure -- ATK-1208 -- Do not change the location of this section to any other place in this template -->
947 <#if PostArticleSlideShareKeyFieldSet.PostArticleSlideShareKeyFieldSetFieldSet.PostArticleSlideshareContent?has_content>
948 <#assign linkAssetArticle = ArticleTemplateCustomService.getManualArticle(PostArticleSlideShareKeyFieldSet.PostArticleSlideShareKeyFieldSetFieldSet.PostArticleSlideshareContent.getData())!"null" />
949 <#if !linkAssetArticle?matches("null")>
950 <#assign jArt = JournalArticleLocalService.getLatestArticle(linkAssetArticle.getClassPK())>
951 <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))>
952 <#assign structureName = jArt.getDDMStructure().getName("en_US")>
953 <#if structureName?matches("Link")>
954 var articleSidebarRichText = <@entryNode document=document field="ArticleSidebarRichText"/>;
955 var linkWebContentData = {
956 articleSidebarRichText: articleSidebarRichText
957 }
958 sidebarContents.push({
959 linkWebContentData:linkWebContentData,
960 componentType:"linkWebContent"
961 });
962 </#if>
963 </#if>
964 </#if>
965
966 </#if>
967
968 <#-- ATK - 902 Changes Start -->
969 ATK.isArticlePage = 'false';
970 <#if LandingArticle == false >
971 <#if themeDisplay.getURLCurrent()?contains("/article/") || themeDisplay.getURLCurrent()?contains("/-/") >
972 ATK.isArticlePage = 'true';
973 </#if>
974 </#if>
975 <#-- ATK - 902 Changes Over -->
976
977 ATK.React.App.Article('articleDiv', articleMetadata, articleContents, bios, sidebarContents);
978
979 // Run embedded scripts after article renders.
980 for (var i in articleContents) {
981
982 var re = /<script>(.+)<\/script>/gi;
983 var thisExtractedScript = ['', ''];
984
985 while (null != (thisExtractedScript = re.exec(articleContents[i].content))) {
986 window.eval(thisExtractedScript[1]);
987 }
988 }
989
990</script>
991
992<div class="atk-container">
993 <hr class="after-25-px-phone" style="display: none;" id="hrfeatureArticle">
994</div>
995
996
997<div id="articleAdtDiv_${portletId}" class="articleAdtDiv" />
998
999<script>
1000<#assign enableRelatedInsights = false>
1001
1002<#if EnableRelatedInsights??>
1003 <#assign enableRelatedInsights = getterUtil.getBoolean(EnableRelatedInsights.getData())>
1004</#if>
1005<#if enableRelatedInsights == true>
1006<#assign multiArtBehavior = "Two Wide">
1007<#assign gridTitle = "Also of interest">
1008<#assign noOfFeatureArticle = "2">
1009<#assign featureDisplayType = "Image Left">
1010
1011<#assign fullWidthDisplay = "false">
1012<#assign greyBackground = "false">
1013<#assign extraSpacer = "None">
1014<#assign seeAllLink = "">
1015<#assign seeAllLinkText = "">
1016<#assign greyBackground = "false">
1017<#assign extraSpacer = "None">
1018<#assign autoplay = "false">
1019<#assign featureDisplayButtonType = "Visible">
1020<#assign featureDisplayButtonText = "">
1021
1022<#if GridTitle??>
1023 <#assign gridTitle = htmlUtil.unescape(GridTitle.getData())>
1024</#if>
1025<#if gridTitle?has_content>
1026 <#-- ATK-712: Code Start -->
1027 <#if gridTitle?matches("Related insights") || gridTitle?matches("Related Insights")>
1028 <#assign gridTitle = "Also of interest">
1029 </#if>
1030 <#-- ATK-712: Code End -->
1031<#else>
1032 <#assign gridTitle = "Also of interest">
1033</#if>
1034<#if MultipleArticleBehavior??>
1035 <#assign multiArtBehavior = MultipleArticleBehavior.getData()>
1036</#if>
1037<#if multiArtBehavior?has_content>
1038<#else>
1039 <#assign multiArtBehavior = "Two Wide">
1040</#if>
1041<#if NoOfFeatureArticles??>
1042 <#assign noOfFeatureArticle = NoOfFeatureArticles.getData()>
1043</#if>
1044<#if noOfFeatureArticle?has_content>
1045<#else>
1046 <#assign noOfFeatureArticle = "2">
1047</#if>
1048
1049<#assign featureDisplayType = preferences.getValue("featureDisTypeRelatedInsights", "Image Left")?js_string>
1050
1051<#assign jaEntries = {}>
1052<#if RelatedInsightsArticles??>
1053 <#assign jaEntries = ArticleTemplateCustomService.getManualArticleList(RelatedInsightsArticles.getSiblings())>
1054</#if>
1055
1056<#if jaEntries?size == 0 >
1057 <#assign jaEntries = ArticleTemplateCustomService.getRelatedArticles(CurrentAssetEntry.getEntryId(), CurrentAssetEntry.getClassTypeId(), noOfFeatureArticle, "Any")>
1058</#if>
1059
1060<#if jaEntries?size == 0 >
1061 <#assign gridTitle = " ">
1062<#else>
1063 $('#hrfeatureArticle').css('display','block');
1064</#if>
1065
1066var entries = [];
1067 <#if jaEntries?size > 0 >
1068 <#list jaEntries as curEntry>
1069
1070 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
1071 <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))>
1072
1073 <#assign structureName = jArt.getDDMStructure().getName("en_US")>
1074
1075 var componentType = "FEATURED_ARTICLE";
1076
1077 var title = <@entryNode document=document field="ArticleTitle"/>;
1078
1079 var subtitle = <@entryNode document=document field="Subtitle"/>;
1080
1081 var description = <@entryNode document=document field="Description"/>;
1082 if (description == ""){
1083 description = <@entryNode document=document field="Intro"/>;
1084 }
1085
1086 var slug = <@entryNode document=document field="Slug"/>;
1087
1088 <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())>
1089
1090 <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)??
1091 && LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")?? >
1092 <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
1093 <#else>
1094 <#assign isMicroSite = false>
1095 </#if>
1096
1097 var image = '${TemplateCustomService.getDocumentURL(document,"ThumbnailSquare",themeDisplay)}';
1098 if (null == image || "" == image || ${(fullWidthDisplay == "true")?c}) {
1099 image = '${TemplateCustomService.getDocumentURL(document,"Thumbnail",themeDisplay)}';
1100 }
1101 if (null == image) {
1102 image = "";
1103 }
1104
1105 var componentData = {
1106 locale: "${locale}",
1107 structureName: "${structureName}",
1108 displayType: "${featureDisplayType}",
1109 slug: slug,
1110 title: title,
1111 subtitle: subtitle,
1112 description: description,
1113 image: image.trim(),
1114 groupFriendlyUrl: '${articleGroup.getFriendlyURL()}',
1115 isMicrosite: ${isMicroSite?c},
1116 multiArtBehavior: '${multiArtBehavior}',
1117 featureDisplayButtonText: '${featureDisplayButtonText}',
1118 featureDisplayButtonType: '${featureDisplayButtonType}',
1119 componentType: componentType
1120 };
1121 <#if structureName == "Article">
1122
1123 var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>;
1124
1125 if (linkTargetOverride !== ""){
1126 componentData.link = linkTargetOverride;
1127 } else {
1128 <#assign assetCategories = AssetCategoryLocalService.getCategories(curEntry.getClassNameId(), curEntry.getClassPK())>
1129
1130 var articleCategories = [];
1131
1132 <#list assetCategories as category>
1133 <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())>
1134 <#assign categoryUrl = "#">
1135
1136 <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty>
1137
1138 <#if categoryProperty.key == "url">
1139 <#assign categoryUrl = categoryProperty.value>
1140 </#if>
1141 </#list>
1142
1143 articleCategories.push({
1144 id: "${category.categoryId}",
1145 name: "${category.name}",
1146 url: "${categoryUrl}",
1147 vocabularyName: "${categoryVocabulary.getTitle(locale)}",
1148 });
1149
1150 </#list>
1151
1152
1153 componentData.categories = articleCategories;
1154 componentData.urlTitle = "${jArt.getUrlTitle()?js_string}";
1155 }
1156
1157 var byline = <@entryNode document=document field="Byline"/>;
1158 if (byline != null && byline != ""){
1159 componentData.byline = [];
1160 };
1161 </#if>
1162 entries.push(componentData);
1163 </#list>
1164 </#if>
1165
1166var componentVoiceSearch = "article";
1167var extraProps = {
1168 multiArtBehavior: "${multiArtBehavior}",
1169 gridTitle: "${gridTitle}",
1170 fullWidthDisplay: "${fullWidthDisplay}",
1171 greyBackground: "${greyBackground}",
1172 extraSpacer: "${extraSpacer}",
1173 seeAllLink: "${seeAllLink}",
1174 seeAllLinkText: "${seeAllLinkText}",
1175 componentVoiceSearch: componentVoiceSearch
1176 };
1177 ATK.React.Component.FeaturedMultiDisplay("articleAdtDiv_${portletId?js_string}", extraProps, entries);
1178</#if>
1179</script>
1180
1181<#compress>
1182<#if (htmlUtil.unescape(Slug.getData()))?lower_case == "article" >
1183 <script id ="article-structured-data" type="application/ld+json">
1184 {
1185 "@context": "https://schema.org",
1186 "@type": "Article",
1187 "dateModified" : "${modifiedDate}",
1188 "datePublished": "${displayDateForSchema}",
1189 <#if (ArticleTitle.getData())?has_content>"headline": "${(htmlUtil.unescape(ArticleTitle.getData()))?json_string}",</#if>
1190 <#if answer?has_content>
1191 <#if answer?contains("l2it-audio-player")>
1192 <#assign answer = answer?json_string?keep_before_last('<div id') />
1193 <#else>
1194 <#assign answer = answer?json_string />
1195 </#if>
1196 "description" : "${answer}",</#if>
1197 <#if imageurlschema?has_content>"image" : "${imageurlschema}",</#if>
1198 "mainEntityOfPage": {
1199 "@type": "WebPage",
1200 "@id": "${pageurlcurrent}"
1201 },
1202 "author" : [
1203 <#if (authorlistschema?size > 0)>
1204 <#list authorlistschema as author>
1205 {
1206 "@type" : "Person",
1207 <#list author as cur_author_key, cur_author_value>
1208 <#if cur_author_key=="url" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
1209 <#if cur_author_key=="jobTitle" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
1210 <#if cur_author_key=="name" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}"</#if>
1211
1212 </#list>
1213 }<#if (author?index != (authorlistschema?size)-1)>,</#if>
1214 </#list>
1215 </#if>
1216 ],
1217 "publisher": {
1218 "@type": "Organization",
1219 "@id": "https://www.kearney.com#organization"
1220 }
1221 }
1222 </script>
1223<#elseif (htmlUtil.unescape(Slug.getData()))?lower_case == "question and answer" >
1224 <script id ="answer-structured-data" type="application/ld+json">
1225 {
1226 "@context": "https://schema.org",
1227 "@type": "FAQPage",
1228 "mainEntity": [{
1229 "@type": "Question",
1230 "name": "${(htmlUtil.unescape(ArticleTitle.getData()))?json_string}",
1231 "acceptedAnswer": {
1232 "@type": "Answer",
1233 <#if answer?has_content>
1234 <#if answer?contains("l2it-audio-player")>
1235 <#assign answer = answer?json_string?keep_before_last('<div id') />
1236 <#else>
1237 <#assign answer = answer?json_string />
1238 </#if>
1239 "text" : "${answer}",</#if>
1240 "author" : [
1241 <#if (authorlistschema?size > 0)>
1242 <#list authorlistschema as author>
1243 {
1244 "@type" : "Person",
1245 <#list author as cur_author_key, cur_author_value>
1246 <#if cur_author_key=="url" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
1247 <#if cur_author_key=="jobTitle" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
1248 <#if cur_author_key=="name" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}"</#if>
1249
1250 </#list>
1251 }<#if (author?index != (authorlistschema?size)-1)>,</#if>
1252 </#list>
1253 </#if>
1254 ]
1255 }
1256 }]
1257 }
1258 </script>
1259 </#if>
1260 </#compress>
1261
1262
1263 <script>
1264// Listen for Liferay's SPA navigation event
1265if (window.Liferay && Liferay.on) {
1266 Liferay.on('endNavigate', function() {
1267 // If the new page contains the audio player container, initialize Listen2It
1268 if (document.getElementById('l2it-audio-player')) {
1269 // Check if Listen2It has already been loaded; if not, load it.
1270 if (typeof Listen2It === 'undefined') {
1271 try {
1272 initialize(document, "listen2it-widget");
1273 }
1274 catch(error) {
1275 console.error("Error with Listen2it Audio:", error);
1276 }
1277 }
1278 else {
1279 // If the widget is already loaded, just initialize it for the new page
1280 try {
1281 initListen2It();
1282 }
1283 catch(error) {
1284 console.error("Error with initialization Listen2it Audio:", error);
1285 }
1286 }
1287 }
1288 });
1289}
1290</script>
1291
1292
1293 <script>
1294$(document).ready(function() {
1295
1296$("#linkedInShare").on( "click", function() {
1297 Analytics.track('socialShare',{
1298 'propertyName': 'socialShare',
1299 <#if (ArticleTitle.getData())?has_content>"articleTitle": "${(htmlUtil.unescape(ArticleTitle.getData()))?json_string}",</#if>
1300 'socialPlatform':'Linkedin',
1301 'pageURL':themeDisplay.getLayoutURL()
1302 });
1303 })
1304
1305 $("#twitterShare").on( "click", function() {
1306 Analytics.track('socialShare',{
1307 'propertyName': 'socialShare',
1308 <#if (ArticleTitle.getData())?has_content>"articleTitle": "${(htmlUtil.unescape(ArticleTitle.getData()))?json_string}",</#if>
1309 'socialPlatform':'Twitter',
1310 'pageURL':themeDisplay.getLayoutURL()
1311 });
1312 })
1313
1314 $("#facebookShare").on( "click", function() {
1315 Analytics.track('socialShare',{
1316 'propertyName': 'socialShare',
1317 <#if (ArticleTitle.getData())?has_content>"articleTitle": "${(htmlUtil.unescape(ArticleTitle.getData()))?json_string}",</#if>
1318 'socialPlatform':'Facebook',
1319 'pageURL':themeDisplay.getLayoutURL()
1320 });
1321 })
1322
1323 $("#printIcon").on( "click", function() {
1324 Analytics.track('printPage',{
1325 'propertyName': 'printPage',
1326 <#if (ArticleTitle.getData())?has_content>"articleTitle": "${(htmlUtil.unescape(ArticleTitle.getData()))?json_string}",</#if>
1327 'pageURL':themeDisplay.getLayoutURL()
1328 });
1329 })
1330
1331});
1332 </script>