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