Menú de navegación

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> nav_item.item.getLayout()  [in template "151808#151842#924441" at line 85, column 40]

----
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: #assign nav_item_layout = nav_item.it...  [in template "151808#151842#924441" at line 85, column 13]
----
1<style> 
2    .notBrowsable { 
3        pointer-events: none; 
4
5	.menu-principal { 
6		margin-right: 12vw; 
7
8 
9	.glyphicon.glyphicon-user { 
10    	font-size: 12px; 
11		margin-bottom: 1px; 
12		color: #333 !important; 
13
14	 
15	.monigote-login{ 
16	    width:30%; 
17	    left:50%; 
18
19 
20	@media (max-width: 1366px) { 
21		.menu-principal { 
22			margin-right: 4vw; 
23
24
25	@media (max-width: 1182px) { 
26		.menu-principal { 
27			margin-right: 1vw; 
28
29
30	@media (max-width: 1127px) { 
31		.menu-principal { 
32			margin-right: 0; 
33
34		.selector-lenguaje { 
35			margin: 45px 0vw 0 2vw; 
36
37
38	@media (max-width: 950px) { 
39		.selector-lenguaje { 
40			margin: 10px 0 0 1vw; 
41
42
43</style> 
44 
45<#-- Función para parsear un nav_item con sus campos personalizados a un hash --> 
46<#function getNavData nav_items checkMenuType> 
47	<#assign myLinks = [] /> 
48	<#list nav_items as nav_item> 
49		<#assign navData = [] /> 
50		 
51		<#if nav_item.hasChildren()> 
52	 		<#assign children = nav_item.getChildren() /> 
53		<#else> 
54			<#assign children = [] /> 
55		</#if> 
56		<#assign myLinks = myLinks + [ {"item" : nav_item, "children" : children} ] /> 
57	</#list> 
58	<#return myLinks /> 
59</#function> 
60 
61<#-- Macro para pintar el menú con sus submenús --> 
62<#macro printLevel nav_items special_style> 
63	<#list nav_items as nav_item> 
64        <#assign nav_item_layout = nav_item.getLayout() /> 
65        <#assign nav_item_custom2 = nav_item_layout.getExpandoBridge().getAttribute("target")> 
66        <#assign target = (nav_item_custom2?first??)?then(nav_item_custom2?first, "_self") /> 
67		<li> 
68			<a target="${target}" class="${nav_item.isSelected()?then(" current-site-navitem", "")}" style="${special_style}" href="${nav_item.getURL()}" > ${nav_item.getName()} </a> 
69			<#if nav_item.hasChildren()> 
70				<ul class="child-menu child-menu-sub" role="menu"> 
71					<@printLevel nav_items = nav_item.getChildren()	special_style = ""/> 
72				</ul> 
73			</#if> 
74		</li> 
75	</#list> 
76</#macro> 
77 
78<#-- Fill the list --> 
79<#assign nav = getNavData(entries, true) /> 
80 
81<#-- HTML print the list --> 
82<ul class="menu-principal clearfix"> 
83	<#list nav as nav_item> 
84	    <#assign browsable = nav_item.item.isBrowsable()?then('', 'notBrowsable') /> 
85	    <#assign nav_item_layout = nav_item.item.getLayout() /> 
86		<#assign nav_item_custom2 = nav_item_layout.getExpandoBridge().getAttribute("target")> 
87		<#assign target = (nav_item_custom2?first??)?then(nav_item_custom2?first, "_self") /> 
88		<li> 
89			<a target="${target}" class='${nav_item.item.isSelected()?then("current-site-navitem", "")} ${browsable}' href='${nav_item.item.getURL()}'> 
90				<p>${nav_item.item.getName()}</p> 
91			</a> 
92            <#if nav_item.children?size &gt; 0> 
93                <div class="triangle-down invisible"></div> 
94                <ul class="child-menu child-menu-header" role="menu"> 
95                    <@printLevel nav_items = nav_item.children	special_style = "margin: 0; font-weight: 300; font-size: .875em;" /> 
96                </ul> 
97            </#if>		 
98		</li> 
99		<#sep><span class="list-separator">|</span></#sep> 
100	</#list> 
101	<span class="list-separator">|</span> 
102	<li> 
103		<#if themeDisplay.isSignedIn()> 
104			<a target="_self" href='/solicitud-de-germoplasma'> 
105				<p>Solicitud de germoplasma</p> 
106			</a>		 
107		<#else> 
108		    <#if request.getRemoteAddr()?starts_with("10.47.")> 
109			    <a target="_self" href='/c/portal/login' class="monigote-login"> 
110			<#else> 
111			    <a target="_self" href='/acceso' class="monigote-login"> 
112			</#if> 
113				<p class='glyphicon glyphicon-user'></p> 
114			</a>		 
115		</#if>		 
116	</li> 
117</ul>