An error occurred while processing the template.
Error on line 100, column 9 in 20155#20195#20230
layoutLocalService.getLayout(layoutObject.getParentPlid()) is undefined.
It cannot be assigned to baseLayout
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 
9<#assign themeDisplay = request['theme-display'] /> 
10<#assign themeLayout = themeDisplay['plid'] /> 
11<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") /> 
12<#assign layoutObject = layoutLocalService.getLayout(themeLayout?number) /> 
13<#assign pageTitle = layoutObject.getName(locale) /> 
14 
15<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()> 
16<#assign portalUrl = serviceContext.getThemeDisplay().getPortalURL() /> 
17 
18<#--Get layout objects for breadcrumb--> 
19<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService")> 
20<#assign categories = AssetCategoryLocalService.getCategories("com.liferay.portlet.journal.model.JournalArticle", currentArticleResourcePrimKey)/> 
21<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetVocabularyLocalService")> 
22<#assign vocab = AssetVocabularyLocalService.getGroupVocabulary(getterUtil.getLong(groupId), "Primary Category")> 
23<#assign primaryVocabId = vocab.vocabularyId> 
24<#assign LayoutService = serviceLocator.findService("com.liferay.portal.service.LayoutService")> 
25<#assign layouts = LayoutService.getLayouts(getterUtil.getLong(groupId), false)> 
26<#assign imagesPath = getterUtil.getString(request['theme-display']['path-theme-images']) /> 
27 
28<#if categories[0]??> 
29    <#assign foundCategory = -1> 
30    <#assign parentCategory = ""> 
31 
32    <#--Get primary category and the parent --> 
33    <#list categories as tempCategory> 
34        <#if tempCategory.vocabularyId == primaryVocabId> 
35            <#assign category = tempCategory> 
36            <#assign foundCategory = 0> 
37            <#if category.parentCategoryId?? && category.parentCategoryId != 0> 
38                <#assign parentCategory = AssetCategoryLocalService.getCategory(category.parentCategoryId)/> 
39            </#if> 
40            <#break> 
41        </#if> 
42    </#list> 
43 
44    <#--  If primary category does not exist  --> 
45    <#if foundCategory == -1> 
46        <#--Get category that is not level 0 through 3 page--> 
47        <#list categories as tempCategory> 
48            <#if tempCategory.name != "Level 0 - Home Page" && 
49                tempCategory.name != "Level 1 - Category" && 
50                tempCategory.name != "Level 2 - Topic" && 
51                tempCategory.name != "Level 3 - Subtopic"> 
52                <#assign category = tempCategory> 
53                <#assign foundCategory = 0> 
54                <#break> 
55            </#if> 
56        </#list> 
57    </#if> 
58 
59    <#--  If category still not found, use first in list  --> 
60    <#if foundCategory == -1> 
61        <#assign category = categories[0]> 
62        <#if category.parentCategoryId?? && category.parentCategoryId != 0> 
63            <#assign parentCategory = AssetCategoryLocalService.getCategory(category.parentCategoryId)/> 
64        </#if> 
65    </#if> 
66 
67    <#assign categoryName = category.name> 
68    <#assign parentCategoryName = ""> 
69    <#if parentCategory != ""> 
70        <#assign parentCategoryName = parentCategory.name> 
71    </#if> 
72 
73    <#--Get Layout that matches category--> 
74    <#list layouts as layout> 
75        <#assign baseLayout = layouts[0]> 
76        <#assign layoutName = layout.getNameCurrentValue()> 
77        <#assign parentLayoutId = layout.parentLayoutId> 
78        <#-- Check that this layout has the correct name --> 
79        <#if layoutName==categoryName> 
80            <#-- Verify that the current layout has the correct parent layout --> 
81            <#if parentCategoryName == ""> 
82                <#assign baseLayout = layout> 
83                <#break> 
84            </#if> 
85            <#assign parentLayout = ""> 
86            <#list layouts as tempParentLayout> 
87                <#if tempParentLayout.getNameCurrentValue() == parentCategoryName && tempParentLayout.layoutId == parentLayoutId> 
88                    <#assign parentLayout = tempParentLayout> 
89                    <#break> 
90                </#if> 
91            </#list> 
92            <#if parentLayout != ""> 
93                <#assign baseLayout = layout> 
94                <#break> 
95            </#if> 
96        </#if> 
97    </#list> 
98 
99    <#if (layoutObject.getParentPlid())??> 
100        <#assign baseLayout = layoutLocalService.getLayout(layoutObject.getParentPlid())> 
101        <#--Get ancestor layouts of the current layout--> 
102        <#assign ancestorLayouts = LayoutService.getAncestorLayouts(getterUtil.getLong(baseLayout.plid))> 
103    </#if> 
104<#else> 
105    <#--If no categories baselayout equals home page--> 
106    <#assign baseLayout = layouts[0]> 
107</#if> 
108 
109<div class="mos-article"> 
110    <div class="mos-topic-header image-background cover" style="background-image: url(${Header_Image.getData()})"> 
111        <div class="background-gradient"></div> 
112        <div class="page-width"> 
113            <h1 class="title uppercase">${Header_Title.getData()}</h1> 
114        </div> 
115    </div> 
116    <div class="page-width padding-small"> 
117        <div class="custom-breadcrumb u-bold u-uppercase"> 
118            <#if baseLayout.getNameCurrentValue() != "Home"> 
119                <#if ancestorLayouts?size != 0> 
120                    <#assign index = ancestorLayouts?size - 1> 
121                    <#assign lastIndex = ancestorLayouts?size - 1> 
122                    <#list ancestorLayouts?reverse as ancestor> 
123                        <#if index == lastIndex> 
124                            <a href="/" class="hidden-xs">Home</a> <span class="divider hidden-xs"></span> 
125                        </#if> 
126                        <#if ancestor.getNameCurrentValue() != "Hidden Page Folder"> 
127                            <#if index != 0> 
128                                <a href="${ancestor.friendlyURL}" class="hidden-xs">${ancestor.getNameCurrentValue()}</a> 
129                                <span class="divider hidden-xs"></span> 
130                                <#-- Only enters this if statement if ancestor size is greater than 1 --> 
131                                <#-- In that case, this will always be a category page as ancestors consists of topic and cat --> 
132                                <#assign analyticsPageLevel1 = ancestor.getNameCurrentValue()> 
133                                <#-- Path URL is used for analyticsPathUrl--> 
134                                <#assign analyticsPageLevel1PathUrl = ancestor.friendlyURL?split("/")?last> 
135                            <#else> 
136                                <a href="${ancestor.friendlyURL}">${ancestor.getNameCurrentValue()}</a> 
137                                <span class="divider"></span> 
138                                <#if 1 < ancestorLayouts?size> 
139                                    <#-- If ancestor size is greater than 1 --> 
140                                    <#assign analyticsPageLevel2 = ancestor.getNameCurrentValue()> 
141                                    <#assign analyticsPageLevel2PathUrl = ancestor.friendlyURL?split("/")?last> 
142                                <#else> 
143                                    <#-- If ancestor size is 1 --> 
144                                    <#assign analyticsPageLevel1 = ancestor.getNameCurrentValue()> 
145                                    <#assign analyticsPageLevel1PathUrl = ancestor.friendlyURL?split("/")?last> 
146                                </#if> 
147                            </#if> 
148                        </#if> 
149                        <#assign index = index - 1> 
150                    </#list> 
151                    <a href="${baseLayout.friendlyURL}">${baseLayout.getNameCurrentValue()}</a> 
152                    <#-- This will either be topic or subtopic depending if ancestors is size 1 or 2--> 
153                    <#if 1 < ancestorLayouts?size> 
154                    <#-- If ancestor size is greater than 1, subtopic --> 
155                        <#assign analyticsPageLevel3 = baseLayout.getNameCurrentValue()> 
156                        <#assign analyticsPageLevel3PathUrl = baseLayout.friendlyURL?split("/")?last> 
157                    <#else> 
158                    <#-- If ancestor size is 1 --> 
159                        <#-- There is no subtopic associated with this article --> 
160                        <#assign analyticsPageLevel2 = baseLayout.getNameCurrentValue()> 
161                        <#assign analyticsPageLevel2PathUrl = baseLayout.friendlyURL?split("/")?last> 
162                    </#if> 
163                <#else> 
164                    <a href="/">Home</a> <span class="divider"></span> 
165                    <a href="${baseLayout.friendlyURL}">${baseLayout.getNameCurrentValue()}</a> 
166                    <#-- This will always be a category b/c ancestors size will always be 0 here --> 
167                    <#assign analyticsPageLevel1 = baseLayout.getNameCurrentValue()> 
168                    <#assign analyticsPageLevel1PathUrl = baseLayout.friendlyURL?split("/")?last> 
169                </#if> 
170            <#else> 
171                <#--Back to home if there are no ancestors (cats, topics, subtopics) associated--> 
172                <a href="${baseLayout.friendlyURL}" tabindex="0"><img class="breadcrumb-back-arrow" src="${imagesPath}/icons/back.svg" alt=""> Back to Home</a> 
173            </#if> 
174        </div> 
175    </div> 
176 
177    <#-- BEGIN GOOGLE ANALYTICS & GOOGLE TAG MANAGER CODE--> 
178    <#-- GA & GTM code should be placed after breadcrumb logic --> 
179    <#-- This analytics code pulls from analytics variable that are assigned above in breadcrumb logic --> 
180 
181    <#-- Assign analyticsPageType which must be updated manually for each template --> 
182    <#assign analyticsPageType = "Basic Info"> 
183    <#-- Assign analyticsCurrentPageTitle of current page which is used in the analyticsTitleUrl variable --> 
184    <#assign analyticsCurrentPageTitle = currentArticleAssetEntry.getTitle(locale)> 
185    <#-- Assign analyticsCurrentPagePath of current page which is used in the analyticsPathUrl variable --> 
186    <#assign analyticsCurrentPagePath= layoutObject.getFriendlyURL(locale)?split("/")?last /> 
187 
188    <#-- Import "Google Analytics Template" (below code must be copied on each template but does not need modification) --> 
189    <#assign ClassNameLocalServiceUtil = objectUtil("com.liferay.portal.service.ClassNameLocalServiceUtil")/> 
190    <#assign DDMTemplateService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService")> 
191    <#assign className = ClassNameLocalServiceUtil.getClassName("com.liferay.portlet.dynamicdatamapping.model.DDMStructure") /> 
192    <#assign classNameId = className.getClassNameId() /> 
193    <#assign ddmTemplates= DDMTemplateService.getTemplates(groupId, classNameId) /> 
194 
195    <#-- Loop through all local templates (ADTs are not included here) --> 
196    <#list ddmTemplates as template> 
197        <#-- If template name matches "Google Analytics Template" import template using templateKey --> 
198        <#if template.getNameCurrentValue() == "Google Analytics Template"> 
199            <#include "${templatesPath}/${template.templateKey}" /> 
200        </#if> 
201    </#list> 
202 
203    <#-- END GOOGLE ANALYTICS & GOOGLE TAG MANAGER CODE--> 
204 
205    <#if Text.getData() != "" || Lead_Text.getData() != ""> 
206        <div class="article-content page-width padding-medium"> 
207            <div class="grid"> 
208                <div class="col-md-2 empty"></div> 
209                <div class="col-md-8"> 
210                    <#if Lead_Text.getData() != ""> 
211                        <div class="article-head"> 
212                            <p class="lead-text">${Lead_Text.getData()}</p> 
213                        </div> 
214                    </#if> 
215                    ${Text.getData()} 
216                    <#if (.vars['hideaddthis'].getData())?? && getterUtil.getBoolean(.vars['hideaddthis'].getData())> 
217                    <#else> 
218                        <div class="addthis-container"> 
219                            <div class="addthis_inline_share_toolbox"></div> 
220                            <#--  Show this Print to PDF button if the page is a Benefits or Resources page  --> 
221                            <#if pageTitle?lower_case?contains("benefits") || pageTitle?lower_case?contains("resources")> 
222                                <a class="at-share-btn at-svc-pdf" onclick="javascript:saveAsPdf()" aria-label="print to pdf"></a> 
223                            </#if> 
224                        </div> 
225                    </#if> 
226                </div> 
227                <div class="col-md-2 empty"></div> 
228            </div> 
229        </div> 
230    </#if> 
231</div> 
232<#if pageTitle?lower_case?contains("benefits") || pageTitle?lower_case?contains("resources")> 
233    <script> 
234        function saveAsPdf() { 
235            var imgData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ4AAABkCAYAAAC2AlbEAAAeBklEQVR42u2dCZgU1bWAeUnMrjEzPYPi7nNJonka6WUGsLsHEKSquqGr6YjiAmqIydMQl+eW5we4JqgxRp8mauKCCRqNL8a44q5PX1yjzsaignHfdwUEck9V9dDT09117lZVDed8X30q0lW3bt17/nvPPcuwYVXSky19vTtdWFd59WQKt7ycm/XVYQFJd6a4f3faXjW4DfZJPPfoSdtXV79Hjfd6gOue2cJ0v3s692V9qLd/7EcQ7/Y77P36slMtzHupuljbnlbVF73p4mz2rV+uvBZ3FfbQP0YLy8Tf3/6Eje9nWT/cz8bU6f3ZYlzBmLgS+ezPerOF3Xnvz/r1Gtz72asWZ4vfGkZCwqdch4LHG7AP90wsteh/fvHInnRhbY3nE3gIPIO/R6n0RTZWXhryjIy9MMrgqTO/nmEQNUTb07/PtBHsvT9EPmsRF9zH2mnse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7nmqBcQlWEaigC+1x+hGyY0D5FaY3oeRMuX/Zn10DKYnge+jQm00LnqgKmO5gVYC9VJv6GrVjGAkJie+8cWrOIC6eueskfkXed/ioQvvG0M88elLFBc/9F12HkEUoHvfVAAAAAElFTkSuQmCC'; 
236             
237            var doc = new jsPDF('p', 'pt', 'letter'); 
238     
239            doc.addImage(imgData, 'JPEG', 40, 40, 160, 39) 
240             
241            <#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('(?s)<h1>.+</h1>',"",'r')?replace("</h[0-9]>","</h[0-9]><split>","r")?replace("</div>","</div><split>") /> 
242     
243            <#assign cleanSplitContent = cleanContent?split("<split>") /> 
244     
245            doc.addFont('Arial'); 
246            doc.setTextColor(25,72,103); 
247     
248            var yPos = 130 
249            var xPos = 40 
250     
251            doc.setFontSize(24); 
252            doc.setFontType('bold'); 
253             
254            <#assign headline = Text.getData()?replace("&amp;","&")?replace("</h1>","<split>")?replace("<h1>","")?split("<split>")> 
255            <#assign headline = headline[0]> 
256             
257            var text = "${headline?replace('"', "'")}" 
258            var lineHeight = doc.getLineHeight(text) / doc.internal.scaleFactor 
259            var splitTitle = doc.splitTextToSize(text, 522); 
260            var lines = splitTitle.length 
261            var blockHeight = lines * lineHeight 
262            doc.text(xPos, yPos, splitTitle); 
263            yPos += blockHeight + 6 
264     
265            <#list cleanSplitContent as item> 
266     
267                <#if !item?contains("button-area")> 
268                    <#if item?contains("<h3") || item?contains("<h2")> 
269                        doc.setFontSize(14); 
270                        doc.setFontType('bold'); 
271                        doc.setTextColor(25,72,103); 
272                        yPos += 10 
273                    <#else> 
274                        doc.setFontSize(11); 
275                        doc.setFontType('normal'); 
276                        doc.setTextColor(74,74,74); 
277                    </#if> 
278     
279                    var text = "<@compress single_line=true>${item?replace('<[^>]+>','','r')?replace('&nbsp;',' ')}</@compress>" 
280                    var lineHeight = doc.getLineHeight(text) / doc.internal.scaleFactor 
281                    <#if item?contains("<p><bullet>") && item?contains("href")> 
282                        var xPos = 60 
283                        var splitTitle = doc.splitTextToSize(text, 522); 
284                    <#elseif item?contains("<p><bullet>")> 
285                        var xPos = 60 
286                        var splitTitle = doc.splitTextToSize(text, 502); 
287                    <#else> 
288                        var xPos = 40 
289                        var splitTitle = doc.splitTextToSize(text, 522); 
290                    </#if> 
291                    var lines = splitTitle.length 
292                    var blockHeight = lines * lineHeight 
293     
294                    if ((yPos + blockHeight) >= 720) { 
295                      doc.addPage(); 
296                      var yPos = 50 
297
298                    doc.setFillColor(25, 72, 103) 
299                    <#if item?contains("href") || item?contains("<p>")> 
300                        <#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;'") > 
301                    doc.fromHTML("<@compress single_line=true>${formattedItem}</@compress>", xPos, yPos - 23, {'width': 522}); 
302                         
303                        <#assign linkURL = "${item}"?split("'") /> 
304                        <#assign counter = 0> 
305                        <#list linkURL as link> 
306                             
307                            <#if link?contains("href")> 
308                                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]}'}); 
309                            </#if> 
310                            <#assign counter = counter + 1> 
311                        </#list> 
312                        <#if item?contains("<p><bullet>")> 
313                            doc.circle(50, (yPos - 4), 2, 'F'); 
314                        </#if> 
315                    <#else> 
316                        doc.text(xPos, yPos, splitTitle); 
317                    </#if> 
318                    yPos += blockHeight + 10 
319                </#if> 
320            </#list> 
321             
322            doc.save("${headline?lower_case?replace('"', "'")?replace(" – | — | – ","-",'r')?replace(' ', "-")}.pdf"); 
323
324    </script> 
325</#if>