Things to Do When Separating from the Military

An error occurred while processing the template.
The following has evaluated to null or missing:
==> fields[0]  [in template "20155#20195#14632" at line 31, column 33]

----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to be 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: field = fields[0]  [in template "20155#20195#14632" at line 31, column 25]
	- Reached through: #assign-container  [in template "20155#20195#14632" at line 29, column 25]
----
1<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
2<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService" )> 
3<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService" )> 
4<#assign getterUtil = staticUtil["com.liferay.portal.kernel.util.GetterUtil"] /> 
5<#assign currentArticle = JournalArticleLocalService.getArticle(getterUtil.getLong(groupId),.vars['reserved-article-id'].data)> 
6<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey()> 
7<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey)/> 
8<#assign viewCount = currentArticleAssetEntry.viewCount> 
9<#assign assetTags = currentArticleAssetEntry.getTagNames()> 
10<#assign modifyDate = currentArticleAssetEntry.modifiedDate?date> 
11<#assign modifyTime = currentArticleAssetEntry.modifiedDate?time> 
12<#assign totalWords = Text.getData()?length / 5> 
13<#assign wordsPerMin = totalWords/250?round> 
14<#assign source = ""> 
15<#assign altText = ""> 
16<#assign sourceExists = false> 
17<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()> 
18<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
19<#assign portalUrl = themeDisplay.getPortalURL() /> 
20<#assign imagesPath = getterUtil.getString(themeDisplay['path-theme-images']) /> 
21<#if Image.getData()??> 
22    <#assign imgID = Image.getData()?string?split("/")[5]?split("?")[0]> 
23	<#assign fileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
24	<#assign file = fileEntryService.getFileEntryByUuidAndGroupId(imgID, groupId) > 
25 
26	<#if file??>					 
27		<#assign formValuesMap = file.getDDMFormValuesMap(file.getLatestFileVersion(true).getFileVersionId())>		 
28		<#list formValuesMap?values as formValue> 
29			<#assign 		 
30			fields = formValue.getDDMFormFieldValues()  
31			field = fields[0] 
32			name = field.getName()  
33			/> 
34			<#if name == "documentSource" && field.getValue()?? >			 
35				<#assign value = field.getValue() > 
36                <#if value.toString()??> 
37                    <#assign source = value.toString()> 
38                    <#assign sourceExists = true> 
39                </#if> 
40			<#elseif name == "altText" && field.getValue()?? >			 
41				<#assign value = field.getValue() > 
42                <#if value.toString()??> 
43				    <#assign altText = 'alt="' + value.toString() + '"'> 
44                </#if> 
45			</#if> 
46		</#list> 
47	</#if> 
48</#if> 
49 
50<#-- Used by Google Analytics --> 
51<#assign themeLayout = themeDisplay['plid'] /> 
52<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") /> 
53<#assign layoutObject = layoutLocalService.getLayout(themeLayout?number) /> 
54<#assign pageTitle = layoutObject.getName(locale) /> 
55 
56<#--Get layout objects for breadcrumb--> 
57<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
58<#assign categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey)/> 
59<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
60<#assign vocab = AssetVocabularyLocalService.getGroupVocabulary(getterUtil.getLong(groupId), "Primary Category")> 
61<#assign primaryVocabId = vocab.vocabularyId> 
62<#assign LayoutService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutService")> 
63<#assign layouts = LayoutService.getLayouts(getterUtil.getLong(groupId), false)> 
64 
65<#if categories[0]??> 
66    <#assign foundCategory = -1> 
67    <#assign parentCategory = ""> 
68 
69    <#--Get primary category and the parent --> 
70    <#list categories as tempCategory> 
71        <#if tempCategory.vocabularyId == primaryVocabId> 
72            <#assign category = tempCategory> 
73            <#assign foundCategory = 0> 
74            <#if category.parentCategoryId?? && category.parentCategoryId != 0> 
75                <#assign parentCategory = AssetCategoryLocalService.getCategory(category.parentCategoryId)/> 
76            </#if> 
77            <#break> 
78        </#if> 
79    </#list> 
80 
81    <#--  If primary category does not exist  --> 
82    <#if foundCategory == -1> 
83        <#--Get category that is not level 0 through 3 page--> 
84        <#list categories as tempCategory> 
85            <#if tempCategory.name != "Level 0 - Home Page" && 
86                tempCategory.name != "Level 1 - Category" && 
87                tempCategory.name != "Level 2 - Topic" && 
88                tempCategory.name != "Level 3 - Subtopic"> 
89                <#assign category = tempCategory> 
90                <#assign foundCategory = 0> 
91                <#break> 
92            </#if> 
93        </#list> 
94    </#if> 
95 
96    <#--  If category still not found, use first in list  --> 
97    <#if foundCategory == -1> 
98        <#assign category = categories[0]> 
99        <#if category?? && category.parentCategoryId?? && category.parentCategoryId != 0> 
100            <#assign parentCategory = AssetCategoryLocalService.getCategory(category.parentCategoryId)/> 
101        </#if> 
102    </#if> 
103 
104    <#assign categoryName = category.name> 
105    <#assign parentCategoryName = ""> 
106    <#if parentCategory != ""> 
107        <#assign parentCategoryName = parentCategory.name> 
108    </#if> 
109 
110    <#--Get Layout that matches category--> 
111    <#list layouts as layout> 
112        <#assign baseLayout = layouts[0]> 
113        <#assign layoutName = layout.getNameCurrentValue()> 
114        <#assign parentLayoutId = layout.parentLayoutId> 
115        <#-- Check that this layout has the correct name --> 
116        <#if layoutName==categoryName> 
117            <#-- Verify that the current layout has the correct parent layout --> 
118            <#if parentCategoryName == ""> 
119                <#assign baseLayout = layout> 
120                <#break> 
121            </#if> 
122            <#assign parentLayout = ""> 
123            <#list layouts as tempParentLayout> 
124                <#if tempParentLayout.getNameCurrentValue() == parentCategoryName && tempParentLayout.layoutId == parentLayoutId> 
125                    <#assign parentLayout = tempParentLayout> 
126                    <#break> 
127                </#if> 
128            </#list> 
129            <#if parentLayout != ""> 
130                <#assign baseLayout = layout> 
131                <#break> 
132            </#if> 
133        </#if> 
134    </#list> 
135 
136    <#--Get ancestor layouts of the current layout--> 
137    <#assign ancestorLayouts = LayoutService.getAncestorLayouts(getterUtil.getLong(baseLayout.plid))> 
138<#else> 
139    <#--If no categories baselayout equals home page--> 
140    <#assign baseLayout = layouts[0]> 
141</#if> 
142 
143<#--Set header background color for article pages only--> 
144<style> 
145    .mos-header{ 
146        background-color: #f8f9fd !important; 
147
148</style> 
149 
150<div class="mos-article"> 
151    <#if Image.getData() != ""> 
152        <div class="row article-image-row"> 
153            <div class="col-xs-12"> 
154                <div class="article-image" style='background-image:url("${Image.getData()}")'> 
155                    <img src="${Image.getData()}" ${altText}> 
156                </div> 
157            </div> 
158            <#if sourceExists> 
159                <div class="col-xs-12"> 
160                    <div class="article-image-caption"> 
161                        ${source} 
162                    </div> 
163                </div> 
164            </#if> 
165        </div> 
166    </#if> 
167    <div class="page-width padding-small"> 
168        <div class="custom-breadcrumb-container"> 
169            <div class="custom-breadcrumb u-bold u-uppercase"> 
170                <#if baseLayout.getNameCurrentValue() != "Home"> 
171                    <#if ancestorLayouts?size != 0> 
172                        <#assign index = ancestorLayouts?size - 1> 
173                        <#assign lastIndex = ancestorLayouts?size - 1> 
174                        <#list ancestorLayouts?reverse as ancestor> 
175                            <#if index == lastIndex> 
176                                <a href="/" class="hidden-xs">Home</a> <span class="divider hidden-xs"></span> 
177                            </#if> 
178                            <#if ancestor.getNameCurrentValue() != "Hidden Page Folder"> 
179                                <#if index != 0> 
180                                    <a href="${ancestor.friendlyURL}" class="hidden-xs">${ancestor.getNameCurrentValue()}</a> 
181                                    <span class="divider hidden-xs"></span> 
182                                    <#-- Only enters this if statement if ancestor size is greater than 1 --> 
183                                    <#-- In that case, this will always be a category page as ancestors consists of topic and cat --> 
184                                    <#assign analyticsPageLevel1 = ancestor.getNameCurrentValue()> 
185                                    <#-- Path URL is used for analyticsPathUrl--> 
186                                    <#assign analyticsPageLevel1PathUrl = ancestor.friendlyURL?split("/")?last> 
187                                <#else> 
188                                    <a href="${ancestor.friendlyURL}">${ancestor.getNameCurrentValue()}</a> 
189                                    <span class="divider"></span> 
190                                    <#if 1 < ancestorLayouts?size> 
191                                        <#-- If ancestor size is greater than 1 --> 
192                                        <#assign analyticsPageLevel2 = ancestor.getNameCurrentValue()> 
193                                        <#assign analyticsPageLevel2PathUrl = ancestor.friendlyURL?split("/")?last> 
194                                    <#else> 
195                                        <#-- If ancestor size is 1 --> 
196                                        <#assign analyticsPageLevel1 = ancestor.getNameCurrentValue()> 
197                                        <#assign analyticsPageLevel1PathUrl = ancestor.friendlyURL?split("/")?last> 
198                                    </#if> 
199                                </#if> 
200                            </#if> 
201                            <#assign index = index - 1> 
202                        </#list> 
203                        <a href="${baseLayout.friendlyURL}">${baseLayout.getNameCurrentValue()}</a> 
204                        <#-- This will either be topic or subtopic depending if ancestors is size 1 or 2--> 
205                        <#if 1 < ancestorLayouts?size> 
206                        <#-- If ancestor size is greater than 1, subtopic --> 
207                            <#assign analyticsPageLevel3 = baseLayout.getNameCurrentValue()> 
208                            <#assign analyticsPageLevel3PathUrl = baseLayout.friendlyURL?split("/")?last> 
209                        <#else> 
210                        <#-- If ancestor size is 1 --> 
211                            <#-- There is no subtopic associated with this article --> 
212                            <#assign analyticsPageLevel2 = baseLayout.getNameCurrentValue()> 
213                            <#assign analyticsPageLevel2PathUrl = baseLayout.friendlyURL?split("/")?last> 
214                        </#if> 
215                    <#else> 
216                        <a href="/">Home</a> <span class="divider"></span> 
217                        <a href="${baseLayout.friendlyURL}">${baseLayout.getNameCurrentValue()}</a> 
218                        <#-- This will always be a category b/c ancestors size will always be 0 here --> 
219                        <#assign analyticsPageLevel1 = baseLayout.getNameCurrentValue()> 
220                        <#assign analyticsPageLevel1PathUrl = baseLayout.friendlyURL?split("/")?last> 
221                    </#if> 
222                <#else> 
223                    <#--Back to home if there are no ancestors (cats, topics, subtopics) associated--> 
224                    <a href="${baseLayout.friendlyURL}"><img class="breadcrumb-back-arrow" src="${imagesPath}/icons/back.svg" alt=""> Back to Home</a> 
225                </#if> 
226            </div> 
227        </div> 
228    </div> 
229 
230    <#-- BEGIN GOOGLE ANALYTICS & GOOGLE TAG MANAGER CODE--> 
231    <#-- GA & GTM code should be placed after breadcrumb logic --> 
232    <#-- This analytics code pulls from analytics variable that are assigned above in breadcrumb logic --> 
233 
234    <#-- Assign analyticsPageType which must be updated manually for each template --> 
235    <#assign analyticsPageType = "Article"> 
236    <#-- Assign analyticsCurrentPageTitle of current page which is used in the analyticsTitleUrl variable --> 
237    <#assign analyticsCurrentPageTitle = currentArticleAssetEntry.getTitle(locale)> 
238    <#-- Assign analyticsCurrentPagePath of current page which is used in the analyticsPathUrl variable --> 
239    <#assign analyticsCurrentPagePath= currentArticle.urlTitle> 
240 
241    <#-- Import "Google Analytics Template" (below code must be copied on each template but does not need modification) --> 
242    <#assign ClassNameLocalServiceUtil = objectUtil("com.liferay.portal.kernel.service.ClassNameLocalServiceUtil")/> 
243    <#assign DDMTemplateService = staticUtil["com.liferay.dynamic.data.mapping.service.DDMTemplateLocalServiceUtil"] /> 
244    <#assign className = ClassNameLocalServiceUtil.getClassName("com.liferay.dynamic.data.mapping.kernel.DDMStructure") /> 
245    <#assign classNameId = className.getClassNameId() /> 
246    <#assign ddmTemplates= DDMTemplateService.getTemplates(groupId, classNameId) /> 
247 
248    <#-- Loop through all local templates (ADTs are not included here) --> 
249    <#list ddmTemplates as template> 
250        <#-- If template name matches "Google Analytics Template" import template using templateKey --> 
251        <#if template.getNameCurrentValue() == "Google Analytics Template"> 
252            <#include "${templatesPath}/${template.templateKey}" /> 
253        </#if> 
254    </#list> 
255 
256    <#-- END GOOGLE ANALYTICS & GOOGLE TAG MANAGER CODE--> 
257 
258    <div class="article-content page-width padding-medium"> 
259        <div class="grid"> 
260            <div class="col-md-2 empty"></div> 
261            <div class="col-md-8"> 
262                <div class="article-head"> 
263                    <div class="metadata"> 
264                        ${modifyDate?string.long} @ ${modifyTime?string.short}<span class="seperator"> | </span>${wordsPerMin?string["0"]} Min Read<span class="seperator view-more"> <#if viewCount gt 9> | </span><span class="view-more">${viewCount} Views</span></#if> 
265                    </div> 
266                    <h1 class="title">${currentArticleAssetEntry.getTitle(locale)}</h1> 
267                </div> 
268                <#if (.vars['title'].getData())??> 
269                    <#assign promolink = "" /> 
270                    <#assign promotitle = "" /> 
271                    <#assign promodescription = "" /> 
272                    <#assign promoimage = "" /> 
273                    <#assign imageClass = "noImage" /> 
274 
275                    <#if .vars['buttontext'].getData()?has_content && .vars['buttonurl'].getData()?has_content> 
276                        <#assign promolink = "<a id='promotionButton' 
277                            data-event='active' data-category='in-content cta' data-action='${.vars['buttontext'].getData()}' data-label='${.vars['buttonurl'].getData()}' 
278                            href='${.vars['buttonurl'].getData()}' class='filled-button blue'>${.vars['buttontext'].getData()}</a>" /> 
279                    </#if> 
280                    <#if .vars['description'].getData()?has_content> 
281                        <#assign promodescription = "<p>${.vars['description'].getData()}</p>" /> 
282                    </#if> 
283                    <#if .vars['title'].getData()?has_content> 
284                        <#assign promotitle = "<h2>${.vars['title'].getData()}</h2>" /> 
285                    </#if> 
286                    <#if .vars['imagep'].getData()?has_content> 
287                        <#assign imageClass = "hasImage" /> 
288                        <#assign promoimage = "<div class='col-sm-4'><div class='promotion-image' role='img' aria-label='Promotion Image' style='background: url(${.vars['imagep'].getData()}) no-repeat center center;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;'></div></div>" /> 
289                    </#if> 
290                    ${Text.getData()?replace("<promotion></promotion>", "<div class='promotion ${imageClass}'><div class='grid'>${promoimage}<div class='col-sm-8'><div class='promotion-content'>${promotitle}${promodescription}${promolink}</div></div><div class='clearfix'></div></div></div>")} 
291                <#else> 
292                    ${Text.getData()} 
293                </#if> 
294 
295                <#if embedassetpublisher?? && getterUtil.getBoolean(embedassetpublisher.getData())>  
296                    <#assign layoutObject = layoutLocalService.getLayout(themeLayout?number) /> 
297                    <#assign pageTitle = layoutObject.getFriendlyURL(locale)?replace("/","") /> 
298                    <#assign titleLength =  pageTitle?length> 
299                    <#if titleLength?number &gt; 15 > 
300                        <#assign pageTitle = pageTitle?substring(titleLength?number-14) />  
301                    </#if> 
302                    <#assign preferences = freeMarkerPortletPreferences.getPreferences("selectionStyle", "manual") /> 
303  
304                    <@liferay_portlet["runtime"] 
305                        portletName="com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet"  
306                        instanceId=pageTitle?lower_case 
307                        defaultPreferences=preferences /> 
308                </#if> 
309 
310                <#if assetTags?size gt 0> 
311                    <div class="taglib-asset-tags-summary"> 
312                    <span class="tags-title">Tags:</span> 
313                        <#list assetTags as x> 
314                            <div class="single-tag-div"> 
315                                <a class="tag" href="/search#!/${x}?searchText=${x}"> 
316                                    ${x} 
317                                </a> 
318                            </div> 
319                        </#list> 
320                    </div> 
321                </#if> 
322 
323                <#if !(hideaddthis?? && getterUtil.getBoolean(hideaddthis.getData()))> 
324                    <div class="addthis-container"> 
325                        <div class="addthis_inline_share_toolbox" data-label="${currentArticleAssetEntry.getTitle(locale)}"></div> 
326                        <a class="at-share-btn at-svc-pdf" data-event="active" data-category="addThis social icons" 
327                            data-action="Print to PDF" data-label="${currentArticleAssetEntry.getTitle(locale)}" 
328                            onclick="javascript:saveAsPdf()" onkeydown="if (event.keyCode == 13)javascript:saveAsPdf()" id="generatepdf" aria-label="print to pdf" tabindex="0"></a> 
329                    </div> 
330                </#if> 
331            </div> 
332            <div class="col-md-2 empty"></div> 
333        </div> 
334    </div> 
335</div> 
336 
337<script type="text/javascript"> 
338   var addthis_config = { 
339      data_ga_property: 'UA-123456-1', 
340      data_ga_social: true 
341      data_use_flash: false, 
342      data_use_cookies: false, 
343      ui_508_compliant: true 
344   }; 
345</script> 
346 
347<script> 
348    function saveAsPdf() { 
349        var imgData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ4AAABkCAYAAAC2AlbEAAAeBklEQVR42u2dCZgU1bWAeUnMrjEzPYPi7nNJonka6WUGsLsHEKSquqGr6YjiAmqIydMQl+eW5we4JqgxRp8mauKCCRqNL8a44q5PX1yjzsaignHfdwUEck9V9dDT09117lZVDed8X30q0lW3bt17/nvPPcuwYVXSky19vTtdWFd59WQKt7ycm/XVYQFJd6a4f3faXjW4DfZJPPfoSdtXV79Hjfd6gOue2cJ0v3s692V9qLd/7EcQ7/Y77P36slMtzHupuljbnlbVF73p4mz2rV+uvBZ3FfbQP0YLy8Tf3/6Eje9nWT/cz8bU6f3ZYlzBmLgS+ezPerOF3Xnvz/r1Gtz72asWZ4vfGkZCwqdch4LHG7AP90wsteh/fvHInnRhbY3nE3gIPIO/R6n0RTZWXhryjIy9MMrgqTO/nmEQNUTb07/PtBHsvT9EPmsRF9zH2mnse/Rmir8kLUqiDDzuhC70Ls3aW2t7dqYwr8FkIfAQeAYrxKx9eL1V/ZLxxR2bCTwVbb/5+eyMzQV3fz9DP6dr6mTMPdfNnfs5Nt7+gbpn2n792fGlb5AWJVELHvd6YUl6v2+rfCYMbjbhLvKZkAQeAk/VmCn011eChYubETxe2xcziOzM2yYGrC+zebIcCbilsGNEWCCOQLc9U/wBaVASXeABxfFmT1cxpcxckilci5goBB4Cz/o2dxWLfucoz43bf3gzgsdr//Klk0ptAlaDEodZ7L8a3WuFecA3Ya4jv+mTsBggDUqiDTyeHf1Dpoj3lX0Wm2B3ICcigYfAU/F9C3/3VazZ4s+bFTxeP92/Ljv3CwLwuR+5s3pv2YRCe4M5dAEaYmPtNGlPEv3g8TxYQBkLrVjHHdyKUR4EHgJPtfRn7C7kmHl36aTpmzUreNyxVDyCH8rF77Hxvwa5gLy01j3A8w3OypDf81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2DRRYmZia6rKdFAVu5zPIJOD6CJSNXhgJ8L68dMgdj0D7wAFLhulg1IU3yiaz7ApwFPe/Tj16N36J6o67lm4p2halKiBx4FPR350o609gcffnAXZLlRNWlA4bNF0oaz5tv6iLLcXu/9NqktzgyedSHZubthDsK0L0LWKAP8YLMCklLZi8Hg64ZKgdj2VHm9uPJG5XPUZOOhNWetQU4CncisJB5ReWWKBWBbzHSehILuHrokVJnjcM4vcmHrwIfDwuKkaM5xYH1hBCxzEQ4wFJHQcFoBAVotYwjxP1LvJS2l/A7xzEMAZ0v54fleIs8DWmqkR63MTpJFRMn80gAcO/7HjSNWupyxOJVm2c3XrRQmbaN91Sh7EzWkqjiOaDjzVHQpptx1XU8iY6qxSWcc6W21jtTf5lzoOAwwGYE7jLVbUjOBpBB8+8NhzutP2a8129WSLB6rsS9dd1bSdsgkQxBg3H4ddAeT/c0wozr+bj3nj7BRwc1edip7LDJfM7cDa82Mv+zbMiyedvG9OICosvBicEuZ9oIggtgYUNsylYREQNysBG7tJ82defz4J9Y28WKlVjudWwuwGpeVE3idNUzTsIUjweHphYdC7nmqBcQlWEaigC+1x+hGyY0D5FaY3oeRMuX/Zn10DKYnge+jQm00LnqgKmO5gVYC9VJv6GrVjGAkJie+8cWrOIC6eueskfkXed/ioQvvG0M88elLFBc/9F12HkEUoHvfVAAAAAElFTkSuQmCC'; 
350        var doc = new jsPDF('p', 'pt', 'letter'); 
351 
352        doc.addImage(imgData, 'JPEG', 40, 40, 160, 39) 
353         
354        <#assign cleanContent = Text.getData()?replace('”|“|"|’',"'",'r')?replace("–|—","-",'r')?replace("…","...",'r')?replace("<ul>|</ul>|<ol>|</ol>","",'r')?replace("<li class='number'>","<p><number>")?replace("<li>","<p><bullet>")?replace("</li>","</p>")?replace("<a","<span")?replace("</a>","</span>")?replace("</p>","</p><split>")?replace("</h2>","</h2><split>")?replace("</div>","</div><split>") /> 
355 
356        <#assign cleanSplitContent = cleanContent?split("<split>") /> 
357 
358        doc.addFont('Arial'); 
359        doc.setTextColor(25,72,103); 
360 
361        var yPos = 130 
362        var xPos = 40 
363 
364        doc.setFontSize(24); 
365        doc.setFontType('bold'); 
366 
367        var text = "${currentArticleAssetEntry.getTitle(locale)?replace('"', "'")}" 
368        var lineHeight = doc.getLineHeight(text) / doc.internal.scaleFactor 
369        var splitTitle = doc.splitTextToSize(text, 522); 
370        var lines = splitTitle.length 
371        var blockHeight = lines * lineHeight 
372        doc.text(xPos, yPos, splitTitle); 
373        yPos += blockHeight + 6 
374 
375        doc.setFontSize(10); 
376        var text = "${modifyDate?string.long} @ ${modifyTime?string.short} | ${wordsPerMin?string['0']} Min Read | ${viewCount} Views" 
377        var lineHeight = doc.getLineHeight(text) / doc.internal.scaleFactor 
378        var splitTitle = doc.splitTextToSize(text, 522); 
379        var lines = splitTitle.length 
380        var blockHeight = lines * lineHeight 
381        doc.text(xPos, yPos, splitTitle); 
382        yPos += blockHeight + 24 
383        <#assign listcounter = 1 /> 
384        <#list cleanSplitContent as item> 
385 
386            <#if !(item?contains("button-area") || item?contains("col-md-6") || item?contains("</div>"))> 
387                <#if item?contains("<h")> 
388                    doc.setFontSize(14); 
389                    doc.setFontType('bold'); 
390                    doc.setTextColor(25,72,103); 
391                    yPos += 10 
392                    <#assign listcounter = 1 /> 
393                <#else> 
394                    doc.setFontSize(11); 
395                    doc.setFontType('normal'); 
396                    doc.setTextColor(74,74,74); 
397                </#if> 
398 
399                var text = "<@compress single_line=true>${item?replace('add</i>','')?replace('<[^>]+>','','r')?replace('&nbsp;',' ')}</@compress>" 
400                var lineHeight = doc.getLineHeight(text) / doc.internal.scaleFactor 
401                <#if item?contains("<p><bullet>") && item?contains("href")> 
402                    var xPos = 60 
403                    var splitTitle = doc.splitTextToSize(text, 522); 
404                <#elseif item?contains("<p><bullet>") || item?contains("<p><number>")> 
405                    var xPos = 60 
406                    var splitTitle = doc.splitTextToSize(text, 502); 
407                <#else> 
408                    var xPos = 40 
409                    var splitTitle = doc.splitTextToSize(text, 522); 
410                </#if> 
411                var lines = splitTitle.length 
412                var blockHeight = lines * lineHeight 
413 
414                if ((yPos + blockHeight) >= 720) { 
415                  doc.addPage(); 
416                  var yPos = 50 
417
418                doc.setFillColor(25, 72, 103) 
419                <#if item?contains("href") || item?contains("<p>")> 
420                    <#assign formattedItem = item?replace('&nbsp;',' ')?replace("<span","<span style='color:#d64054'")?replace("<p","<p style='font-family: Arial, Helvetica, sans-serif;font-size:15px;color:#4a4a4a;'") > 
421                doc.fromHTML("<@compress single_line=true>${formattedItem}</@compress>", xPos, yPos - 23, {'width': 522}); 
422                     
423                    <#assign linkURL = "${item}"?split("'") /> 
424                    <#assign counter = 0> 
425                    <#list linkURL as link> 
426                        <#if linkURL[counter + 1]??> 
427                            <#assign next = linkURL[counter + 1]> 
428                            <#if link?contains("href")> 
429                                doc.link(xPos, yPos - 11, 522, blockHeight, {url: '<#if next?contains("http")><#elseif next?contains("//")>https:<#elseif !next?contains(".")>${portalUrl}</#if>${next}'}); 
430                            </#if> 
431                            <#assign counter = counter + 1> 
432                        </#if> 
433                    </#list> 
434                    <#if item?contains("<p><bullet>")> 
435                        doc.circle(50, (yPos - 4), 2, 'F'); 
436                    </#if> 
437                    <#if item?contains("<p><number>")> 
438                        doc.text(53, yPos, '${listcounter}.', "right"); 
439                        <#assign listcounter = listcounter + 1 /> 
440                    </#if> 
441                <#else> 
442                    doc.text(xPos, yPos, splitTitle); 
443                </#if> 
444 
445                yPos += blockHeight + 10 
446            </#if> 
447        </#list> 
448 
449        doc.save("${currentArticleAssetEntry.getTitle(locale)?lower_case?replace('"', "'")?replace(' ', "-")}.pdf"); 
450
451</script>