An error occurred while processing the template.
The following has evaluated to null or missing:
==> CurrentJournalArticle.getDisplayDate()  [in template "20116#20152#33020" at line 67, column 24]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

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