An error occurred while processing the template.
The following has evaluated to null or missing:
==> entry  [in template "10157#10197#69994" at line 156, column 39]

----
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 categories = entry.getCategor...  [in template "10157#10197#69994" at line 156, column 17]
----
1<#assign templateClass="selector-${template_id}"> 
2<#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryService")> 
3<#assign categoryId=0> 
4<#list request.getParameterNames() as parameter> 
5    <#if parameter = "categoryId"> 
6        <#assign categoryId=request.getParameter("categoryId")> 
7    </#if> 
8</#list> 
9<style scoped> 
10    .${templateClass} .layout-content > .categories { 
11        border: 1px solid #CCC; 
12        border-top-left-radius: 10px; 
13        border-bottom-left-radius: 10px; 
14		background: #eee; 
15		border-top: 0; 
16		margin-bottom: 15px; 
17
18    .${templateClass} .layout-content > .categories a:hover { 
19        text-decoration: none; 
20
21    .${templateClass} .selected { 
22        background: #D9EDF7; 
23
24    .${templateClass} ul { 
25        list-style-type: none; 
26        margin: 0; 
27
28    .${templateClass} ul li li { 
29        margin-left: 0; 
30
31    .${templateClass} ul li ul li { 
32        background: #eee; 
33		border-bottom: 1px solid #ccc; 
34
35    .${templateClass} ul li ul li a:hover { 
36       color: #0070b4; 
37
38    .${templateClass} ul li ul li:before { 
39		color: #000; 
40		content: "\f061"; 
41		font-family: 'fontawesome-alloy'; 
42		padding: 0 5px 0 25px; 
43		font-size: smaller; 
44
45    .${templateClass} .layout-content > .categories > li { 
46        border-top: 1px solid #CCC; 
47
48    .${templateClass} .layout-content > .categories > li:first-of-type { 
49        border-top: 0; 
50
51    .${templateClass} .categories > li.selected { 
52	    background: #0070b4; 
53		background: -webkit-linear-gradient(top, #0fabf6, #0070b4); 
54		background: linear-gradient(#0fabf6, #0070b4); 
55
56	 
57	.${templateClass} .categories > li.selected.expanded > i { 
58		color: #FFF; 
59
60	.${templateClass} .categories > li.selected.expanded a { 
61        color: #FFF; 
62        padding: 0px; 
63        display: inline-block; 
64
65	.${templateClass} .categories > li a { 
66        width: 78%; 
67        display: inline-block; 
68
69	.${templateClass} .categories > li.selected.expanded > ul li { 
70		background: #eee; 
71		border-bottom: 1px solid #ccc; 
72
73	.${templateClass} .categories > li.selected.expanded > ul li a { 
74        color: #505050; 
75
76	.${templateClass} .categories > li > ul li:before { 
77		color: #b2b2b2; 
78		content: "\f061"; 
79		font-family: 'fontawesome-alloy'; 
80		padding: 0 5px 0 15px; 
81		font-size: smaller; 
82
83	.${templateClass} .categories > li.selected.expanded > ul li.selected:before { 
84		color: #0070b4; 
85
86	 
87    .${templateClass} .categories li li:first-child { 
88        border-top: 1px solid #ccc; 
89
90    .${templateClass} li a, .${templateClass} li i { 
91        line-height: 34px; 
92
93    .${templateClass} li.activity a { 
94        color: #000; 
95        margin-left: 22px; 
96        line-height: normal; 
97
98    .${templateClass} ul li > .icon-minus,.${templateClass} ul li > .icon-plus { 
99        padding: 8px; 
100        border-radius: 2px; 
101
102    .${templateClass} ul li > .icon-minus:hover,.${templateClass} ul li > .icon-plus:hover { 
103        cursor: pointer; 
104
105 
106    .${templateClass} ul li > .icon-minus, .${templateClass} ul li > ul { 
107        display: none; 
108
109    .${templateClass} ul li.expanded > ul { 
110        display: block; 
111
112    .${templateClass} ul li.expanded > .icon-minus { 
113        display: inline; 
114
115    .${templateClass} ul li.expanded > .icon-plus { 
116        display: none; 
117
118    @media screen and (max-width: 768px) { 
119	    .${templateClass} .layout-content > .categories { 
120	        margin-top: 12px; 
121
122
123	ul.categories { 
124		padding: 0; 
125
126    .${templateClass} ul li.expanded > ul { 
127        background: #ffffff; 
128
129    li.yearLevels { 
130        color: #FFF; 
131        background: #484848; 
132        padding: 18px; 
133        font-size: 14pt; 
134        border: 1px solid #484848; 
135        border-top-left-radius: 10px; 
136
137     
138</style> 
139<script type="text/javascript"> 
140$(document).ready(function(){ 
141    $('.icon-minus, .icon-plus').each(function(){ 
142        var node = $(this), 
143        li = node.parent(); 
144        node.on('click', function(e){ 
145            e.preventDefault(); 
146            li.toggleClass('expanded'); 
147        }); 
148    }); 
149}); 
150</script> 
151<#assign aui = PortletJspTagLibs["/META-INF/liferay-aui.tld"] /> 
152<div class="${templateClass}"> 
153    <#if entries?has_content> 
154        <@aui.row> 
155            <#list entries as entry> 
156                <#assign categories = entry.getCategories()?sort_by("categoryId")> 
157                <@displayCategories categories=categories isCategoryTree=false currentLevel=0 showLevel=2/> 
158            </#list> 
159        </@aui.row> 
160    </#if> 
161</div> 
162 
163<#macro displayCategories categories isCategoryTree currentLevel showLevel> 
164 
165    <#if categories?has_content> 
166        <#assign count="selected expanded"> 
167         
168            <ul class="categories"> 
169            
170            <#list categories as category> 
171                <#if category.getCategoryId()?number == 115872> 
172                    <li class="yearLevels">Year Levels</li> 
173                </#if> 
174                <#if isCategoryTree || category.isRootCategory()> 
175                    <#if category.getCategoryId()?string = categoryId?string> 
176                        <#assign cssClass="selected expanded"> 
177                    <#else> 
178                        <#assign cssClass=""> 
179                    </#if> 
180                    <#assign childCategories = assetCategoryService.getChildCategories(category.getCategoryId())> 
181                    <#if childCategories?has_content> 
182                        <#assign isAncestor=false> 
183                        <#if categoryId?number != 0> 
184                            <#list assetCategoryService.getCategory(categoryId?number).getAncestors() as ancestor> 
185                                <#if ancestor.getCategoryId()?string = category.getCategoryId()?string> 
186                                    <#assign isAncestor=true> 
187                                </#if> 
188                            </#list> 
189                        </#if> 
190                        <#if isAncestor> 
191                            <#assign cssClass=cssClass + "selected expanded"> 
192                        </#if> 
193                        <li class="${cssClass}"> 
194                        <#if currentLevel < showLevel - 1> 
195                            <i class="icon-minus"></i> 
196                            <i class="icon-plus"></i> 
197                        </#if> 
198                    <#else> 
199                        <#assign cssClass=cssClass + " activity"> 
200                        <li class="${cssClass}"> 
201                    </#if> 
202                        <#assign categoryURL = renderResponse.createRenderURL()> 
203     
204                        ${categoryURL.setParameter("resetCur", "true")} 
205                        ${categoryURL.setParameter("categoryId", category.getCategoryId()?string)} 
206     
207                        <a href="${categoryURL}">${category.getName()}</a> 
208                        <#assign newLevel = currentLevel + 1> 
209                        <#if newLevel < showLevel> 
210                           <@displayCategories categories=childCategories isCategoryTree=true currentLevel=newLevel showLevel=showLevel/> 
211                        </#if> 
212                    </li> 
213                    <#if category.getCategoryId()?number == 115883> 
214                        <li style="height: 50px;">&nbsp;</li> 
215                    </#if> 
216                </#if> 
217            </#list> 
218             
219        </ul> 
220    </#if> 
221</#macro> 
222 
223<script> 
224$( "ul.categories li" ).hover( 
225    function() { 
226        $( this ).not('.yearLevels').css( 'color', '#0070b4' ); 
227    }, function() { 
228        $( this ).not('.yearLevels').css( 'color', '#333' ); 
229
230); 
231</script> 
Back

Error