Industrial demand planning: a key enabler for localization in the GCC
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 = 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 = 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 = "${Slug.getData()?js_string}";
390 articleMetadata.articleTitle = "${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 = "${Subtitle.getData()?js_string}";
413 articleMetadata.intro = "${Intro.getData()?js_string}";
414
415 <#assign LandingArticle = false />
416 <#if LandingPage??>
417 articleMetadata.landingPage = '${getterUtil.getBoolean(LandingPage.getData())?c}';
418 <#assign LandingArticle = getterUtil.getBoolean(LandingPage.getData()) />
419 <#else>
420 articleMetadata.landingPage = false;
421 </#if>
422
423 <#if SocialLinks??>
424 <#if SocialLinks.getData() == "">
425 articleMetadata.socialLinks = true;
426 <#else>
427 articleMetadata.socialLinks = ${getterUtil.getBoolean(SocialLinks.getData())?c};
428 </#if>
429 <#else>
430 articleMetadata.socialLinks = false;
431 </#if>
432
433 <#if GraySeparator??>
434 <#if GraySeparator.getData() == "">
435 articleMetadata.graySeparator = true;
436 <#else>
437 articleMetadata.graySeparator = ${getterUtil.getBoolean(GraySeparator.getData())?c};
438 </#if>
439 <#else>
440 articleMetadata.graySeparator = false;
441 </#if>
442
443 <#if ShowParentBreadcrumb?? && LandingPage?? && getterUtil.getBoolean(LandingPage.getData()) == true>
444 articleMetadata.showParentBreadcrumb = ${getterUtil.getBoolean(ShowParentBreadcrumb.getData())?c}
445 <#else>
446 articleMetadata.showParentBreadcrumb = true;
447 </#if>
448
449 <#if BreadcrumbLabel??>
450 articleMetadata.parentBreadcrumbLabel = "${BreadcrumbLabel.getData()?js_string}";
451 </#if>
452
453 <#if BreadcrumbURL??>
454 articleMetadata.parentBreadcrumbURL = "${BreadcrumbURL.getData()?js_string}";
455 </#if>
456
457 <#if Byline??>
458 articleMetadata.byline = "${Byline.getData()?js_string}";
459 </#if>
460
461 <#if FeaturedContributor??>
462 articleMetadata.featuredContributor = "${FeaturedContributor.getData()}"
463 </#if>
464
465 <#if PostArticleSlideShareKey?? && PostArticleSlideShareKey.PostArticleSlideshareContent??>
466 articleMetadata.postArticleSlideshareKey = "${PostArticleSlideShareKey.getData()}"
467
468 articleMetadata.postArticleSlideshareContent = "${PostArticleSlideShareKey.PostArticleSlideshareContent.getData()}"
469 </#if>
470
471 <#if PDF??>
472 articleMetadata.pdf = "${PDF.getData()?js_string}"
473 <#else>
474 articleMetadata.pdf = "";
475 </#if>
476
477 var articleContents = [];
478 <#if Content.getSiblings()?has_content>
479 <#list Content.getSiblings() as cur_Content>
480
481 var images = [];
482
483 <#if cur_Content.PrimaryImage?has_content>
484 <#list cur_Content.PrimaryImage.getSiblings() as cur_PrimaryImage>
485
486 var image = {"imageURL": "${cur_PrimaryImage.getData()?js_string}"};
487
488 <#if cur_Content.PrimaryImage.SlideshowCaption??>
489 image["caption"] = "${cur_PrimaryImage.SlideshowCaption.getData()?js_string}";
490 </#if>
491
492 image["sharingEnabled"] = ${(cur_PrimaryImage.SharingEnabled?? && cur_PrimaryImage.SharingEnabled.getData() == "true")?c};
493
494 images.push(image);
495
496 </#list>
497 </#if>
498
499 articleContents.push({
500 <#if cur_Content.FeatureSlug??>
501 slug: "${cur_Content.FeatureSlug.getData()?js_string}",
502 </#if>
503 <#if cur_Content.TextAlignment??>
504 textAlignment: "${cur_Content.TextAlignment.getData()?js_string}",
505 </#if>
506 content: "${cur_Content.getData()?js_string}",
507 styling: "${cur_Content.stylingSelect.getData()?js_string}",
508 alternateText: "${cur_Content.AlternateText.getData()?js_string}",
509 primaryImage: images,
510 secondaryImage: "${cur_Content.SecondaryMaskImage.getData()?js_string}",
511 buttonText: "${cur_Content.ButtonText.getData()?js_string}",
512 buttonURL: "${cur_Content.ButtonURL.getData()?js_string}",
513 displayDate: "${displayDate}"
514 });
515
516
517 </#list>
518 </#if>
519
520 var bios = [];
521 <#assign articleGroup = GroupLocalService.getGroup(CurrentAssetEntry.getGroupId())
522 guestGroup = GroupLocalService.getFriendlyURLGroup(articleGroup.getCompanyId(), "/guest") />
523 <#--
524 Create list of groups that asset entries live in, so that linked bios can be retrieved by UUID
525 -->
526 <#assign assetLinkGroups = []>
527 <#if AssetLinks?has_content>
528 <#list AssetLinks as assetLink>
529 <#assign linkedAssetEntry = AssetEntryLocalService.getAssetEntry(assetLink.getEntryId2())>
530 <#assign assetLinkGroups = assetLinkGroups + [linkedAssetEntry.getGroupId()]>
531 </#list>
532 </#if>
533
534 //Create asset link ordering
535 var assetOrderArr = [];
536
537 <#list assetLinkOrder?split(",") as assetLinkUUID>
538 <#--
539 Find group which asset link is stored in and assign the resulting asset entry
540 -->
541 <#assign orderAssetEntry = "">
542
543 <#list assetLinkGroups as assetLinkGroupId>
544 <#assign orderAssetEntry = AssetEntryLocalService.fetchEntry(assetLinkGroupId, assetLinkUUID)!"">
545
546 <#if orderAssetEntry != "">
547 <#break />
548 </#if>
549 </#list>
550
551 <#if orderAssetEntry != "">
552 <#assign orderJournalArticle = JournalArticleLocalService.fetchLatestArticle(orderAssetEntry.getClassPK())!"">
553 <#if orderJournalArticle != "">
554 assetOrderArr.push("${orderJournalArticle.getArticleId()}");
555 </#if>
556 </#if>
557 </#list>
558
559 var assetOrderMap = {};
560
561 for(var order=1; order<assetOrderArr.length; order++) {
562 assetOrderMap[assetOrderArr[order-1]] = order;
563 }
564
565 var getAssetOrder = function(uuid) {
566 var order = assetOrderMap[uuid];
567 if(!order) {
568 order = Object.keys(assetOrderMap).length + 1;
569 assetOrderMap[uuid] = order;
570 }
571
572 return order;
573 };
574 <#assign authorlistschema = [] />
575 <#if Authors?? && Authors.getSiblings()?has_content>
576
577 var bioC =0;
578 <#list Authors.getSiblings() as cur_Authors>
579
580 <#if cur_Authors.getData() != "" >
581 <#assign cur_webContent_map = jsonFactoryUtil.createJSONObject(cur_Authors.getData())>
582 <#assign cur_webContent_classPK = cur_webContent_map.getString("classPK")>
583 <#if cur_webContent_classPK??>
584 <#if JournalArticleLocalService.fetchLatestArticle(cur_webContent_classPK?number)??>
585 <#assign articleK = JournalArticleLocalService.fetchLatestArticle(cur_webContent_classPK?number)>
586 <#assign articleKAssetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",articleK.getResourcePrimKey()) />
587
588 <#if articleKAssetEntry?? && articleKAssetEntry.getAssetRenderer()??>
589 <#assign xml = saxReaderUtil.read(articleKAssetEntry.getAssetRenderer().getArticle().getContentByLocale(themeDisplay.getLocale())) />
590
591
592
593 <#assign xml_fullName = xml.valueOf("//dynamic-element[@name='FullName']/dynamic-content/text()") />
594 <#assign xml_title = xml.valueOf("//dynamic-element[@name='Title']/dynamic-content/text()") />
595 <#assign xml_headshot = TemplateCustomService.getDocumentURL(xml,"CutoutHeadshot",themeDisplay)/>
596 <#if xml_headshot?contains("&download=")>
597 <#assign xml_headshot = xml_headshot?keep_before("&download=")>
598 </#if>
599
600
601 var bio1 = {};
602 bio1.structureKey=('${articleK.getDDMStructure().getName("en_US")}');
603 bio1.weight= ++bioC;
604 bio1.fullName = '${xml_fullName}';
605 bio1.headshot = '${xml_headshot?js_string}';
606 bio1.title = '${xml_title}';
607 <#if (articleGroup.getLiveGroupId() != 0 ) >
608 <#assign articleK = JournalArticleLocalService.getArticleByUrlTitle(assetLibGroupId, articleK.getUrlTitle()) />
609 </#if>
610 <#assign viewURL = '' />
611
612 <#if articleK.getDDMStructure().getName("en_US") == "Bio Page">
613 <#assign viewURL = TemplateCustomService.getArticleViewURL(articleK.getArticleId(),assetLibGroup,articleK.getGroupId(),themeDisplay,guestGroup.getGroupId())/>
614 <#if !(viewURL?has_content)>
615 <#assign viewURL = themeDisplay.getPortalURL() + "/about/people/bio/" + xml_fullName?lower_case?replace(" ", "-")/>
616 </#if>
617 </#if>
618
619 bio1.bioURL = '${viewURL}';
620 bios.push(bio1);
621
622 <#assign viewURLschema = ''/>
623 <#if viewURL?has_content>
624 <#assign viewURLschema = viewURL />
625 </#if>
626 <#assign authordataschema = {"url":viewURLschema, "jobTitle":xml_title, "name":xml_fullName} />
627 <#assign authorlistschema = authorlistschema + [authordataschema] />
628 </#if>
629 </#if>
630 </#if>
631 </#if>
632
633 </#list>
634
635 </#if>
636
637 <#assign oldwaytogetauthourforschema = false>
638 <#if authorlistschema?size == 0>
639 <#assign oldwaytogetauthourforschema = true>
640 </#if>
641
642 if (bios.length == 0){
643 <#if AssetLinks?has_content>
644
645 <#list AssetLinks as assetLink>
646 <#assign linkedAssetEntry = AssetEntryLocalService.getAssetEntry(assetLink.getEntryId2())>
647 <#assign linkedJournalArticle = JournalArticleLocalService.getLatestArticle(linkedAssetEntry.getClassPK())>
648 <#assign xml = saxReaderUtil.read(linkedAssetEntry.getAssetRenderer().getArticle().getContentByLocale(themeDisplay.getLocale())) />
649 <#assign structureKey = linkedJournalArticle.getDDMStructure().getName("en_US") />
650
651 var bio = {};
652
653 <#assign xml_headshot = TemplateCustomService.getDocumentURL(xml,"CutoutHeadshot",themeDisplay)/>
654 <#if xml_headshot?contains("&download=")>
655 <#assign xml_headshot = xml_headshot?keep_before("&download=")>
656 </#if>
657 <#if structureKey == "Bio Page" || structureKey == "Micro Bio" >
658 <#assign xml_fullName = xml.valueOf("//dynamic-element[@name='FullName']/dynamic-content/text()") />
659 <#assign xml_title = xml.valueOf("//dynamic-element[@name='Title']/dynamic-content/text()") />
660 bio.structureKey=('${structureKey}').trim();
661 bio.weight = getAssetOrder("${linkedJournalArticle.getArticleId()}");
662 bio.fullName = "${xml_fullName}";
663 bio.position = "${xml.valueOf("//dynamic-element[@name='Position']/dynamic-content/text()")?js_string}";
664 bio.title = "${xml_title?js_string}";
665 bio.headshot = "${xml_headshot?js_string}";
666 bio.description = "${xml.valueOf("//dynamic-element[@name='Description']/dynamic-content/text()")?js_string}";
667 bio.linkedInURL = "${xml.valueOf("//dynamic-element[@name='LinkedInURL']/dynamic-content/text()")?js_string}";
668
669 <#assign viewURL = '' />
670 <#if linkedJournalArticle.getDDMStructure().getName("en_US") == "Bio Page">
671 <#assign viewURL = themeDisplay.getPortalURL() + "/about/people/bio/" + xml_fullName?lower_case?replace(" ", "-")/>
672 </#if>
673
674 bio.bioURL = '${viewURL}';
675 bios.push(bio);
676
677 <#assign viewURLschema = ''/>
678 <#if viewURL?has_content>
679 <#assign viewURLschema = viewURL />
680 </#if>
681
682 <#if oldwaytogetauthourforschema>
683 <#assign authordataschema = {"url":viewURLschema, "jobTitle":xml_title, "name":xml_fullName} />
684 <#assign authorlistschema = authorlistschema + [authordataschema] />
685 </#if>
686 </#if>
687 </#list>
688
689 bios.sort(function(bio1, bio2){
690 return bio1.weight - bio2.weight;
691 });
692 </#if>
693
694 }
695 <#assign assetCategories = AssetCategoryLocalService.getCategories(CurrentAssetEntry.getClassNameId(), CurrentAssetEntry.getClassPK())>
696
697 var articleCategories = [];
698
699 <#list assetCategories as category>
700 <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())>
701 <#assign categoryUrl = "#">
702
703 <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty>
704
705 <#if categoryProperty.key == "url">
706 <#assign categoryUrl = categoryProperty.value>
707 </#if>
708 </#list>
709
710 articleCategories.push({
711 id: "${category.categoryId}",
712 name: "${category.name}",
713 url: "${categoryUrl}",
714 vocabularyName: "${categoryVocabulary.getName()?js_string}",
715 });
716 </#list>
717
718 articleMetadata.categories = articleCategories;
719 <#if LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false)??
720 && LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false).getThemeSetting("isMicroSite", "regular")?? >
721 <#assign isMicroSite = (LayoutSetService.getLayoutSet(articleGroup.getGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
722 <#else>
723 <#assign isMicroSite = false>
724 </#if>
725
726 articleMetadata.isMicroSite = ${isMicroSite?c};
727 articleMetadata.groupName = "${articleGroup.getName("en_US")?js_string}";
728 articleMetadata.groupFriendlyUrl = "${articleGroup.getFriendlyURL()?js_string}";
729
730 <#if ReadMoreURL??>
731 articleMetadata.readMoreURL = "${ReadMoreURL.getData()?js_string}";
732 <#else>
733 articleMetadata.readMoreURL = "";
734 </#if>
735
736 <#if ReadMoreTextOverride??>
737 articleMetadata.readMoreTextOverride = "${ReadMoreTextOverride.getData()?js_string}";
738 <#else>
739 articleMetadata.readMoreTextOverride = "";
740 </#if>
741
742 <#if ContributorsTitleOverride??>
743 articleMetadata.contributorsTitleOverride = "${ContributorsTitleOverride.getData()?js_string}";
744 <#else>
745 articleMetadata.contributorsTitleOverride = "";
746 </#if>
747
748 <#if ReadMoreOverlay??>
749 articleMetadata.readMoreOverlay = ${getterUtil.getBoolean(ReadMoreOverlay.getData())?c}
750 <#else>
751 articleMetadata.readMoreOverlay = false;
752 </#if>
753
754 var sidebarContents = [];
755 <#assign enableSidebar = false>
756 <#if EnableSidebar??>
757 <#assign enableSidebar = getterUtil.getBoolean(EnableSidebar.getData())>
758 </#if>
759 <#-- Check if Sidebar is enabled or not -->
760 <#if enableSidebar == true>
761
762 <#assign listingOfArticles = false>
763 <#assign singleAssetWithImage = false>
764 <#assign richTextSection = false>
765 <#assign listView = false>
766 <#if EnableSidebar.ListingOfArticles??>
767 <#assign listingOfArticles = getterUtil.getBoolean(EnableSidebar.ListingOfArticles.getData())>
768 </#if>
769 <#if EnableSidebar.SingleAssetWithImage??>
770 <#assign singleAssetWithImage = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.getData())>
771 </#if>
772 <#if EnableSidebar.RichTextSection??>
773 <#assign richTextSection = getterUtil.getBoolean(EnableSidebar.RichTextSection.getData())>
774 </#if>
775 <#if EnableSidebar.ListView??>
776 <#assign listView = getterUtil.getBoolean(EnableSidebar.ListView.getData())>
777 </#if>
778 <#-- If Asset publisher listing of articles is enabled -->
779 <#if listingOfArticles == true>
780 <#assign listOfArticlesTitles = "Related">
781 <#if EnableSidebar.ListingOfArticles.ListingOfArticlesTitle.getData()?has_content>
782 <#assign listOfArticlesTitles = EnableSidebar.ListingOfArticles.ListingOfArticlesTitle.getData()>
783 </#if>
784 <#assign manualArticlesEntries = {}>
785 <#if EnableSidebar.ListingOfArticles.SelectSidebarArticles??>
786 <#assign manualArticlesEntries = ArticleTemplateCustomService.getManualArticleList(EnableSidebar.ListingOfArticles.SelectSidebarArticles.getSiblings())>
787 </#if>
788 var manualArticlesEntry = [];
789 <#if manualArticlesEntries?size > 0 >
790 <#list manualArticlesEntries as curEntry>
791 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
792 <#assign viewURL = TemplateCustomService.getSidebarArticleViewURL(themeDisplay,jArt,assetLibGroup)/>
793 var articleEntry = {"articleTitle": "${TemplateCustomService.getSidebarArticleTitle(themeDisplay,jArt,assetLibGroup)}","articleURL":"${viewURL}"};
794 manualArticlesEntry.push(articleEntry);
795 </#list>
796 <#else>
797 <#assign noOfFeatureArticle = "3">
798 <#if EnableSidebar.ListingOfArticles.NoOfArticlesDisplayed.getData() != "0">
799 <#assign noOfFeatureArticle = EnableSidebar.ListingOfArticles.NoOfArticlesDisplayed.getData()>
800 </#if>
801 <#assign manualArticlesEntries = ArticleTemplateCustomService.getRelatedArticles(CurrentAssetEntry.getEntryId(), noOfFeatureArticle, "Any")>
802 <#list manualArticlesEntries as curEntry>
803 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
804 <#assign viewURL = TemplateCustomService.getSidebarArticleViewURL(themeDisplay,jArt,assetLibGroup)/>
805 var articleEntry = {"articleTitle": "${TemplateCustomService.getSidebarArticleTitle(themeDisplay,jArt,assetLibGroup)}","articleURL":"${viewURL}"};
806 manualArticlesEntry.push(articleEntry);
807 </#list>
808 </#if>
809 sidebarContents.push({
810 listingOfArticlesTitle:"${listOfArticlesTitles}",
811 manualArticles:manualArticlesEntry,
812 componentType:"listingOfArticles"
813
814 });
815 </#if>
816 <#-- Single Asset Image article -->
817 <#if singleAssetWithImage == true>
818 <#assign learnMoreText = "Learn more">
819 <#assign enableTNSImage = true>
820 <#assign enableSlug = true>
821 <#if (EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.LearnMoreButtonText.getData())??>
822 <#assign learnMoreText = EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.LearnMoreButtonText.getData()/>
823 </#if>
824 <#if EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableTNSImage??>
825 <#assign enableTNSImage = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableTNSImage.getData())/>
826 </#if>
827 <#if EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableSlug??>
828 <#assign enableSlug = getterUtil.getBoolean(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.EnableSlug.getData())>
829 </#if>
830 <#assign singleAssetArticleData = jsonFactoryUtil.createJSONObject(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.getData())/>
831 <#if singleAssetArticleData?has_content>
832 <#assign singleAssetArticle = ArticleTemplateCustomService.getManualArticle(EnableSidebar.SingleAssetWithImage.SingleAssetWithImageArticle.getData())>
833 <#assign jArt = JournalArticleLocalService.getLatestArticle(singleAssetArticle.getClassPK())>
834 <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))>
835 <#assign structureName = jArt.getDDMStructure().getName("en_US")>
836 var componentType = "FEATURED_ARTICLE";
837 var title = <@entryNode document=document field="ArticleTitle"/>;
838 var subtitle = <@entryNode document=document field="Subtitle"/>;
839 var description = <@entryNode document=document field="Description"/>;
840 if (description == ""){
841 description = <@entryNode document=document field="Intro"/>;
842 }
843 var slug = <@entryNode document=document field="Slug"/>;
844 var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>;
845 if(linkTargetOverride == "" || linkTargetOverride == null){
846 linkTargetOverride = <@entryNode document=document field="LinkURL"/>;
847 }
848 <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())>
849 <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)??&& LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")??>
850 <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
851 <#else>
852 <#assign isMicroSite = false>
853 </#if>
854 var image = '${TemplateCustomService.getDocumentURL(document,"ThumbnailSquare",themeDisplay)}';
855 if (null == image || "" == image) {
856 image = '${TemplateCustomService.getDocumentURL(document,"Thumbnail",themeDisplay)}';
857 }
858 if (null == image) {
859 image = "";
860 }
861 var singleAssetComponent = {
862 slug: slug,
863 title: title,
864 subtitle: subtitle,
865 description: description,
866 image: image.trim(),
867 groupFriendlyUrl: '${articleGroup.getFriendlyURL()}',
868 isMicrosite: ${isMicroSite?c},
869 linkTargetOverride: linkTargetOverride
870 }
871 sidebarContents.push({
872 singleAssetData:singleAssetComponent,
873 componentType:"singleAsset",
874 learnMoreTextValue:'${learnMoreText}',
875 enableSlugValue:${enableSlug?c},
876 enableTNSImageValue:${enableTNSImage?c}
877 });
878 </#if>
879 </#if>
880 <#-- Rich Text Section -->
881 <#if richTextSection == true>
882 var richTextSectionData = [];
883 <#if EnableSidebar.RichTextSection.RichTextSectionContent.getSiblings()?has_content>
884 <#list EnableSidebar.RichTextSection.RichTextSectionContent.getSiblings() as richTextData>
885 <#if (richTextData.getData())??>
886 <#assign richTextSection = richTextData.getData()>
887 richTextSectionData.push({
888 richTextSectionContent: '${richTextSection?js_string}'
889 });
890 </#if>
891 </#list>
892 </#if>
893
894 sidebarContents.push({
895 richTextContentData : richTextSectionData,
896 componentType:"richTextContent"
897 });
898 </#if>
899 <#-- List View -->
900 <#if listView == true>
901 var listViewComponentData = [];
902 <#assign listViewTitle = "Related">
903 <#assign displayListViewTitle = false>
904 <#if (EnableSidebar.ListView.ListViewTitle.getData())??>
905 <#assign listViewTitle = EnableSidebar.ListView.ListViewTitle.getData()>
906 </#if>
907 <#if (EnableSidebar.ListView.ListViewTitle.getData())??>
908 <#assign displayListViewTitle = getterUtil.getBoolean(EnableSidebar.ListView.ListViewTitle.DisplayListViewTitle.getData())>
909 </#if>
910 <#if EnableSidebar.ListView.ListViewText.getSiblings()?has_content>
911 <#list EnableSidebar.ListView.ListViewText.getSiblings() as listViewData>
912 <#assign listView = listViewData.getData()>
913 <#assign listlink = listViewData.ListViewLink.getData()>
914 listViewComponentData.push({
915 listViewTitle: '${listView}',
916 listViewLink: '${listlink}',
917 });
918 </#list>
919 </#if>
920 sidebarContents.push({
921 listViewData:listViewComponentData,
922 componentType:"listView",
923 listViewTitleValue:'${listViewTitle}',
924 displayListViewTitleValue: ${displayListViewTitle?c}
925 });
926 </#if>
927
928 </#if>
929
930 <#-- ATK - 902 Changes Start -->
931 ATK.isArticlePage = 'false';
932 <#if LandingArticle == false >
933 <#if themeDisplay.getURLCurrent()?contains("/article/") || themeDisplay.getURLCurrent()?contains("/-/") >
934 ATK.isArticlePage = 'true';
935 </#if>
936 </#if>
937 <#-- ATK - 902 Changes Over -->
938
939 ATK.React.App.Article('articleDiv', articleMetadata, articleContents, bios, sidebarContents);
940
941 // Run embedded scripts after article renders.
942 for (var i in articleContents) {
943
944 var re = /<script>(.+)<\/script>/gi;
945 var thisExtractedScript = ['', ''];
946
947 while (null != (thisExtractedScript = re.exec(articleContents[i].content))) {
948 window.eval(thisExtractedScript[1]);
949 }
950 }
951
952</script>
953
954<div class="atk-container">
955 <hr class="after-25-px-phone" style="display: none;" id="hrfeatureArticle">
956</div>
957
958
959<div id="articleAdtDiv_${portletId}" class="articleAdtDiv" />
960
961<script>
962<#assign enableRelatedInsights = false>
963
964<#if EnableRelatedInsights??>
965 <#assign enableRelatedInsights = getterUtil.getBoolean(EnableRelatedInsights.getData())>
966</#if>
967<#if enableRelatedInsights == true>
968<#assign multiArtBehavior = "Two Wide">
969<#assign gridTitle = "Also of interest">
970<#assign noOfFeatureArticle = "2">
971<#assign featureDisplayType = "Image Left">
972
973<#assign fullWidthDisplay = "false">
974<#assign greyBackground = "false">
975<#assign extraSpacer = "None">
976<#assign seeAllLink = "">
977<#assign seeAllLinkText = "">
978<#assign greyBackground = "false">
979<#assign extraSpacer = "None">
980<#assign autoplay = "false">
981<#assign featureDisplayButtonType = "Visible">
982<#assign featureDisplayButtonText = "">
983
984<#if GridTitle??>
985 <#assign gridTitle = GridTitle.getData()>
986</#if>
987<#if gridTitle?has_content>
988 <#-- ATK-712: Code Start -->
989 <#if gridTitle?matches("Related insights") || gridTitle?matches("Related Insights")>
990 <#assign gridTitle = "Also of interest">
991 </#if>
992 <#-- ATK-712: Code End -->
993<#else>
994 <#assign gridTitle = "Also of interest">
995</#if>
996<#if MultipleArticleBehavior??>
997 <#assign multiArtBehavior = MultipleArticleBehavior.getData()>
998</#if>
999<#if multiArtBehavior?has_content>
1000<#else>
1001 <#assign multiArtBehavior = "Two Wide">
1002</#if>
1003<#if NoOfFeatureArticles??>
1004 <#assign noOfFeatureArticle = NoOfFeatureArticles.getData()>
1005</#if>
1006<#if noOfFeatureArticle?has_content>
1007<#else>
1008 <#assign noOfFeatureArticle = "2">
1009</#if>
1010
1011<#assign featureDisplayType = preferences.getValue("featureDisTypeRelatedInsights", "Image Left")?js_string>
1012
1013<#assign jaEntries = {}>
1014<#if RelatedInsightsArticles??>
1015 <#assign jaEntries = ArticleTemplateCustomService.getManualArticleList(RelatedInsightsArticles.getSiblings())>
1016</#if>
1017
1018<#if jaEntries?size == 0 >
1019 <#assign jaEntries = ArticleTemplateCustomService.getRelatedArticles(CurrentAssetEntry.getEntryId(), noOfFeatureArticle, "Any")>
1020</#if>
1021
1022<#if jaEntries?size == 0 >
1023 <#assign gridTitle = " ">
1024<#else>
1025 $('#hrfeatureArticle').css('display','block');
1026</#if>
1027
1028var entries = [];
1029 <#if jaEntries?size > 0 >
1030 <#list jaEntries as curEntry>
1031
1032 <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())>
1033 <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))>
1034
1035 <#assign structureName = jArt.getDDMStructure().getName("en_US")>
1036
1037
1038 var componentType = "FEATURED_ARTICLE";
1039
1040 var title = <@entryNode document=document field="ArticleTitle"/>;
1041
1042 var subtitle = <@entryNode document=document field="Subtitle"/>;
1043
1044 var description = <@entryNode document=document field="Description"/>;
1045 if (description == ""){
1046 description = <@entryNode document=document field="Intro"/>;
1047 }
1048
1049 var slug = <@entryNode document=document field="Slug"/>;
1050
1051 <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())>
1052
1053 <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)??
1054 && LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")?? >
1055 <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")>
1056 <#else>
1057 <#assign isMicroSite = false>
1058 </#if>
1059
1060 var image = '${TemplateCustomService.getDocumentURL(document,"ThumbnailSquare",themeDisplay)}';
1061 if (null == image || "" == image || ${(fullWidthDisplay == "true")?c}) {
1062 image = '${TemplateCustomService.getDocumentURL(document,"Thumbnail",themeDisplay)}';
1063 }
1064 if (null == image) {
1065 image = "";
1066 }
1067
1068 var componentData = {
1069 locale: "${locale}",
1070 structureName: "${structureName}",
1071 displayType: "${featureDisplayType}",
1072 slug: slug,
1073 title: title,
1074 subtitle: subtitle,
1075 description: description,
1076 image: image.trim(),
1077 groupFriendlyUrl: '${articleGroup.getFriendlyURL()}',
1078 isMicrosite: ${isMicroSite?c},
1079 multiArtBehavior: '${multiArtBehavior}',
1080 featureDisplayButtonText: '${featureDisplayButtonText}',
1081 featureDisplayButtonType: '${featureDisplayButtonType}',
1082 componentType: componentType
1083 };
1084 <#if structureName == "Article">
1085
1086 var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>;
1087
1088 if (linkTargetOverride !== ""){
1089 componentData.link = linkTargetOverride;
1090 } else {
1091 <#assign assetCategories = AssetCategoryLocalService.getCategories(curEntry.getClassNameId(), curEntry.getClassPK())>
1092
1093 var articleCategories = [];
1094
1095 <#list assetCategories as category>
1096 <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())>
1097 <#assign categoryUrl = "#">
1098
1099 <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty>
1100
1101 <#if categoryProperty.key == "url">
1102 <#assign categoryUrl = categoryProperty.value>
1103 </#if>
1104 </#list>
1105
1106 articleCategories.push({
1107 id: "${category.categoryId}",
1108 name: "${category.name}",
1109 url: "${categoryUrl}",
1110 vocabularyName: "${categoryVocabulary.getTitle(locale)}",
1111 });
1112
1113 </#list>
1114
1115
1116 componentData.categories = articleCategories;
1117 componentData.urlTitle = "${jArt.getUrlTitle()?js_string}";
1118 }
1119
1120 var byline = <@entryNode document=document field="Byline"/>;
1121 if (byline != null && byline != ""){
1122 componentData.byline = [];
1123 };
1124 </#if>
1125 entries.push(componentData);
1126 </#list>
1127 </#if>
1128
1129var componentVoiceSearch = "article";
1130var extraProps = {
1131 multiArtBehavior: "${multiArtBehavior}",
1132 gridTitle: "${gridTitle}",
1133 fullWidthDisplay: "${fullWidthDisplay}",
1134 greyBackground: "${greyBackground}",
1135 extraSpacer: "${extraSpacer}",
1136 seeAllLink: "${seeAllLink}",
1137 seeAllLinkText: "${seeAllLinkText}",
1138 componentVoiceSearch: componentVoiceSearch
1139 };
1140 ATK.React.Component.FeaturedMultiDisplay("articleAdtDiv_${portletId?js_string}", extraProps, entries);
1141</#if>
1142</script>
1143
1144<#compress>
1145<#if Slug.getData()?lower_case == "article" >
1146 <script id ="article-structured-data" type="application/ld+json">
1147 {
1148 "@context": "https://schema.org",
1149 "@type": "Article",
1150 "dateModified" : "${modifiedDate}",
1151 "datePublished": "${displayDateForSchema}",
1152 <#if (ArticleTitle.getData())?has_content>"headline": "${ArticleTitle.getData()?json_string}",</#if>
1153 <#if answer?has_content>
1154 <#if answer?contains("l2it-audio-player")>
1155 <#assign answer = answer?json_string?keep_before_last('<div id') />
1156 <#else>
1157 <#assign answer = answer?json_string />
1158 </#if>
1159 "description" : "${answer}",</#if>
1160 <#if imageurlschema?has_content>"image" : "${imageurlschema}",</#if>
1161 "mainEntityOfPage": {
1162 "@type": "WebPage",
1163 "@id": "${pageurlcurrent}"
1164 },
1165 "author" : [
1166 <#if (authorlistschema?size > 0)>
1167 <#list authorlistschema as author>
1168 {
1169 "@type" : "Person",
1170 <#list author as cur_author_key, cur_author_value>
1171 <#if cur_author_key=="url" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
1172 <#if cur_author_key=="jobTitle" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
1173 <#if cur_author_key=="name" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}"</#if>
1174
1175 </#list>
1176 }<#if (author?index != (authorlistschema?size)-1)>,</#if>
1177 </#list>
1178 </#if>
1179 ],
1180 "publisher": {
1181 "@type": "Organization",
1182 "@id": "https://www.kearney.com#organization"
1183 }
1184 }
1185 </script>
1186<#elseif Slug.getData()?lower_case == "question and answer" >
1187 <script id ="answer-structured-data" type="application/ld+json">
1188 {
1189 "@context": "https://schema.org",
1190 "@type": "FAQPage",
1191 "mainEntity": [{
1192 "@type": "Question",
1193 "name": "${ArticleTitle.getData()?json_string}",
1194 "acceptedAnswer": {
1195 "@type": "Answer",
1196 <#if answer?has_content>
1197 <#if answer?contains("l2it-audio-player")>
1198 <#assign answer = answer?json_string?keep_before_last('<div id') />
1199 <#else>
1200 <#assign answer = answer?json_string />
1201 </#if>
1202 "text" : "${answer}",</#if>
1203 "author" : [
1204 <#if (authorlistschema?size > 0)>
1205 <#list authorlistschema as author>
1206 {
1207 "@type" : "Person",
1208 <#list author as cur_author_key, cur_author_value>
1209 <#if cur_author_key=="url" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
1210 <#if cur_author_key=="jobTitle" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}",</#if>
1211 <#if cur_author_key=="name" && cur_author_value?has_content>"${cur_author_key}" : "${cur_author_value}"</#if>
1212
1213 </#list>
1214 }<#if (author?index != (authorlistschema?size)-1)>,</#if>
1215 </#list>
1216 </#if>
1217 ]
1218 }
1219 }]
1220 }
1221 </script>
1222 </#if>
1223 </#compress>
1224
1225 <script>
1226$(document).ready(function() {
1227
1228$("#linkedInShare").on( "click", function() {
1229 Analytics.track('socialShare',{
1230 'propertyName': 'socialShare',
1231 <#if (ArticleTitle.getData())?has_content>"articleTitle": "${ArticleTitle.getData()?json_string}",</#if>
1232 'socialPlatform':'Linkedin',
1233 'pageURL':themeDisplay.getLayoutURL()
1234 });
1235 })
1236
1237 $("#twitterShare").on( "click", function() {
1238 Analytics.track('socialShare',{
1239 'propertyName': 'socialShare',
1240 <#if (ArticleTitle.getData())?has_content>"articleTitle": "${ArticleTitle.getData()?json_string}",</#if>
1241 'socialPlatform':'Twitter',
1242 'pageURL':themeDisplay.getLayoutURL()
1243 });
1244 })
1245
1246 $("#facebookShare").on( "click", function() {
1247 Analytics.track('socialShare',{
1248 'propertyName': 'socialShare',
1249 <#if (ArticleTitle.getData())?has_content>"articleTitle": "${ArticleTitle.getData()?json_string}",</#if>
1250 'socialPlatform':'Facebook',
1251 'pageURL':themeDisplay.getLayoutURL()
1252 });
1253 })
1254
1255 $("#printIcon").on( "click", function() {
1256 Analytics.track('printPage',{
1257 'propertyName': 'printPage',
1258 <#if (ArticleTitle.getData())?has_content>"articleTitle": "${ArticleTitle.getData()?json_string}",</#if>
1259 'pageURL':themeDisplay.getLayoutURL()
1260 });
1261 })
1262
1263});
1264 </script>