Neuvontapalvelut Your Europe portaalissa
Your Europe portaali on Euroopan Komission ylläpitämä sivusto, jossa tarjotaan yrityksille ja kansalaisille tietoa eri tilanteisiin kuten ...
Tämä sisältö on asiontipalvelun omistajalle ja kehittäjälle.
The following has evaluated to null or missing: ==> nav_item.getURL()?split("/w/")[1] [in template "20096#20121#181876" at line 18, column 64] ---- Tip: It's the final [] step that caused this error, not those before it. ---- 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: friendlyURL = nav_item.getURL()?split... [in template "20096#20121#181876" at line 18, column 50] ----
1<#include "${templatesPath}/NAVIGATION-MACRO-FTL" />
2<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
3/>
4<#assign currentUrl = themeDisplay.getURLCurrent() />
5
6<#if !entries?has_content>
7 <#if themeDisplay.isSignedIn()>
8 <div class="alert alert-info">
9 <@liferay.language key="there-are-no-menu-items-to-display" />
10 </div>
11 </#if>
12<#else>
13 <div aria-label="<@liferay.language key="site-pages" />" class="list-menu">
14 <ul>
15
16 <#list entries as nav_item>
17 <#assign
18 friendlyURL = nav_item.getURL()?split("/w/")[1]
19 viewFullContentURL = nav_item.getURL()?replace("/w/", "/-/")
20 isActive = currentUrl?ends_with("/" + friendlyURL)
21 article = JournalArticleLocalService.getArticleByUrlTitle(themeDisplay.getSiteGroupId(), friendlyURL)
22 index = nav_item?index + 1/>
23
24
25 <li><a href="${viewFullContentURL}" class="lfr-nav-item ${isActive?string('active', '')}"> ${nav_item.getTitle()} </a>
26
27 <#if (article??)>
28 <#assign docXML = saxReaderUtil.read(article.getDocument().asXML())
29 recommendationStepNodes = docXML.selectNodes("/root/dynamic-element[@field-reference='recommendation_step']/dynamic-content[@language-id='${locale}']")/>
30 <ul class="recommendation-step-list">
31
32 <#list recommendationStepNodes as node>
33 <#assign recommStepJSONString = node.getText()
34 recommStepJSON = jsonFactoryUtil.createJSONObject(recommStepJSONString)
35 recommStepTitle = jsonFactoryUtil.createJSONObject(recommStepJSONString).getString("title")
36 recommStepTitleMap = recommStepJSON.getJSONObject("titleMap")
37 recommStepLocalisedTitle = recommStepTitleMap.getString(locale)
38 recommStepClassPK = recommStepJSON.getString("classPK")
39 />
40 <li><a href="${viewFullContentURL}#recommendation_step_${recommStepClassPK}">${recommStepLocalisedTitle?has_content?then(recommStepLocalisedTitle, recommStepTitle)}</a></li>
41 </#list>
42 </ul>
43 </#if>
44 </li>
45 </#list>
46 </ul>
47
48 </div>
49
50 </#if>