Java method "com.liferay.portal.kernel.theme.NavItem.hasBrowsableChildren()" threw an exception when invoked on com.liferay.site.navigation.taglib.internal.util.SiteNavigationMenuNavItem object "com.liferay.site.navigation.taglib.internal.util.SiteNavigationMenuNavItem@13939b"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign showChildren = (displayDepth ... [in template "20102#20128#1144082" at line 25, column 33] ----
1<#if !entries?has_content>
2 <#if themeDisplay.isSignedIn()>
3 <div class="alert alert-info">
4 <@liferay.language key="there-are-no-menu-items-to-display" />
5 </div>
6 </#if>
7<#else>
8 <#-- A variável objectUtil deverá estar liberada nas preferencias do portal (Pesquisar por freemarker nas em Painel de controle > Configuração do sistema > Configurações da instância) -->
9 <#assign aCK=objectUtil("com.liferay.portal.kernel.util.CookieKeys") />
10 <#if aCK.getCookie(request,"CURRENT_VIEW")??>
11 <#assign CURRENT_VIEW = aCK.getCookie(request,"CURRENT_VIEW") />
12 <#else>
13 <#assign CURRENT_VIEW = "para-voce">
14 </#if>
15 <#assign
16 portletDisplay = themeDisplay.getPortletDisplay()
17
18 navbarId = "navbar_" + portletDisplay.getId()
19 />
20 <div id="${navbarId}">
21 <ul aria-label="<@liferay.language key="site-pages" />" class="navbar-blank navbar-nav navbar-site" role="menubar">
22 <#assign navItems = entries />
23
24 <#list navItems as navItem>
25 <#assign showChildren = (displayDepth != 1) && navItem.hasBrowsableChildren() />
26
27 <#if navItem.isBrowsable() || showChildren>
28 <#assign
29 nav_item_attr_has_popup = ""
30 nav_item_caret = ""
31 nav_item_css_class = "lfr-nav-item nav-item"
32 nav_item_href_link = ""
33 nav_item_link_css_class = "nav-link text-truncate"
34 />
35
36 <#if showChildren>
37 <#assign nav_item_attr_has_popup = "aria-haspopup='true'" />
38
39 <#assign
40 nav_item_css_class = "${nav_item_css_class} dropdown"
41 nav_item_link_css_class = "${nav_item_link_css_class} dropdown-toggle"
42 />
43 </#if>
44
45 <#if navItem.isBrowsable()>
46 <#assign nav_item_href_link = "href='${navItem.getURL()}'" />
47 </#if>
48
49 <#if navItem.isSelected()>
50 <#assign
51 nav_item_css_class = "${nav_item_css_class} selected active"
52 />
53 </#if>
54
55 <#if (!navItem.getName()?contains("Produtos") || (navItem.getName()?contains("Você") && CURRENT_VIEW == "para-voce") || (navItem.getName()?contains("Empresa") && CURRENT_VIEW == "para-empresa") || (navItem.getName()?contains("Agronegócio") && CURRENT_VIEW == "para-agronegocio"))>
56 <li class="${nav_item_css_class}" id="layout_${navItem.getLayoutId()}" role="presentation">
57 <#if !navItem.getName()?contains("Produtos")>
58 <a aria-labelledby="layout_${navItem.getLayoutId()}" ${nav_item_attr_has_popup} class="${nav_item_link_css_class}" ${nav_item_href_link} ${navItem.getTarget()} role="menuitem">
59 <span class="text-truncate"><@liferay_theme["layout-icon"] layout=navItem.getLayout() /> ${navItem.getName()} ${nav_item_caret}</span>
60 </a>
61 <#else>
62 <#if ((navItem.getName()?contains("Você") && CURRENT_VIEW == "para-voce") || (navItem.getName()?contains("Empresa") && CURRENT_VIEW == "para-empresa") || (navItem.getName()?contains("Agronegócio") && CURRENT_VIEW == "para-agronegocio"))>
63 <a aria-labelledby="layout_${navItem.getLayoutId()}" ${nav_item_attr_has_popup} class="${nav_item_link_css_class}" ${nav_item_href_link} ${navItem.getTarget()} role="menuitem">
64 <span class="text-truncate"><@liferay_theme["layout-icon"] layout=navItem.getLayout() /> ${navItem.getName()?keep_before(" - ")} ${nav_item_caret}</span>
65 </a>
66 </#if>
67 </#if>
68
69
70 <#if showChildren>
71 <ul aria-expanded="false" class="child-menu dropdown-menu" role="menu">
72 <#list navItem.getBrowsableChildren() as childNavigationItem>
73
74 <#assign
75 nav_child_css_class = ""
76 />
77
78 <#if childNavigationItem.isSelected()>
79 <#assign
80 nav_child_css_class = "active selected"
81 />
82 </#if>
83
84 <li class="${nav_child_css_class}" id="layout_${childNavigationItem.getLayoutId()}" role="presentation">
85 <a aria-labelledby="layout_${childNavigationItem.getLayoutId()}" class="dropdown-item" href="${childNavigationItem.getURL()}" ${childNavigationItem.getTarget()} role="menuitem">
86 <span class="page-name d-block">${childNavigationItem.getName()} <img class="icon float-right" width="24" height="auto" src="${childNavigationItem.iconURL()}" /></span>
87 <span class="page-description d-block">${childNavigationItem.getLayout().getDescription()}</span>
88 </a>
89 </li>
90 </#list>
91 </ul>
92 </#if>
93 </li>
94 </#if>
95 </#if>
96 </#list>
97 </ul>
98 </div>
99
100 <@liferay_aui.script use="liferay-navigation-interaction">
101 var navigation = A.one('#${navbarId}');
102
103 Liferay.Data.NAV_INTERACTION_LIST_SELECTOR = '.navbar-site';
104 Liferay.Data.NAV_LIST_SELECTOR = '.navbar-site';
105
106 if (navigation) {
107 navigation.plug(Liferay.NavigationInteraction);
108 }
109 </@>
110</#if>