Navegación por categorías

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> vocabulary  [in template "646115#646149#789958" at line 26, column 22]

----
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: #if vocabulary.getVocabularyId() + ""...  [in template "646115#646149#789958" at line 26, column 17]
----
1<#assign ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"] 
2         PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
3         PortletRequest = staticUtil["javax.portlet.PortletRequest"] 
4         assetCategoryService =  serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
5         assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") 
6         journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
7         layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
8         categoryId = ParamUtil.getLong(request,"categoryId", 0) 
9         title =  ParamUtil.getString(request,"title", "") 
10         maxLoop = 100 
11         PropsUtil = staticUtil["com.liferay.portal.kernel.util.PropsUtil"] 
12         portalVocabularyId = PropsUtil.get("medio.ambiente.vocabulary.id") 
13         SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
14         imageId = ParamUtil.getString(request,"imageId","") 
15         HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] 
16/> 
17 
18<#if (categoryId <= 0) > 
19	<#assign categoryId = ParamUtil.getLong(renderRequest,"categoryId", 0)/> 
20</#if> 
21 
22<#if (categoryId <= 0) > 
23     
24    <#if entries?has_content> 
25	    <#foreach vocabulary in entries> 
26	    	<#if vocabulary.getVocabularyId()+"" == portalVocabularyId> 
27	    	    <#foreach aCategory in vocabulary.getCategories()> 
28	    	        <#assign aCategory = aCategory/> 
29	    	        <#break> 
30	    	    </#foreach> 
31	    	    <#list 1..maxLoop as i> 
32	    	        <#list 1..maxLoop as j> 
33	    	            <#if aCategory.getParentCategory()?has_content> 
34	    	                <#assign aCategory = aCategory.getParentCategory()/> 
35	    	            <#else> 
36	        	            <#assign categoryId = aCategory.getCategoryId()/> 
37	                   </#if>   
38	                   <#break> 
39	    	        </#list> 
40	    	        <#if (categoryId > 0) > 
41	    	            <#break> 
42	    	        </#if> 
43	    	    </#list> 
44	    	</#if> 
45	    </#foreach> 
46	 </#if> 
47     
48</#if> 
49 
50<nav aria-label="breadcrumb"> 
51    <ol class="breadcrumb"> 
52       <li class="breadcrumb-title"><span>${languageUtil.get(locale,"medio.ambiente.breadcrumb-title")}</span></li> 
53       <li class="breadcrumb-item"><a href="http://www.asturias.es">${languageUtil.get(locale,"medio.ambiente.breadcrumb-asturias")}</a></li>         
54        <#if (categoryId > 0) > 
55 
56            <#assign category = assetCategoryService.getAssetCategory(categoryId) 
57                     categoryAncestors = category.getAncestors() 
58                     breadCrumbContent = ""/> 
59                      
60            <#if categoryAncestors?has_content> 
61                <#foreach categoryAncestor in categoryAncestors> 
62                	 
63                	<#assign hideCategory = false/> 
64                	 
65                	 <#-- obtener el contenido de la categoría hija --> 
66			        <#if assetCategoryPropertyService.getCategoryProperty(categoryAncestor.getCategoryId(),"idContenido") ? has_content > 
67			        	<#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(categoryAncestor.getCategoryId(),"idContenido")/> 
68			            <#assign contentId = contentIdProperty.getValue()/> 
69			            <#if contentId ? has_content> 
70			            	<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
71			        		 
72			        		<#if journalArticleSub?has_content> 
73				        		<#-- obtener el contenido de la categoría actual --> 
74				                <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
75                        		 	pageDetailNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
76                        		 	/> 
77                        		 <#if document.selectSingleNode("/root/dynamic-element[@name='visibleMigas']/dynamic-content")?has_content> 
78                        		 	<#assign visibleMigasNode =  document.selectSingleNode("/root/dynamic-element[@name='visibleMigas']/dynamic-content")  
79                        		 		visibleMigas =  visibleMigasNode.getText() 
80                        		 			 hideCategory = visibleMigas != "1"/> 
81                        		 </#if> 
82				        	</#if> 
83			 	        </#if> 
84			    	  
85			    	  
86				    	 <#if pageDetailNode?has_content && pageDetailNode.getText()?has_content> 
87			        		<#assign  pageDetail = pageDetailNode.getText()/> 
88			        		<#if (pageDetail?index_of("@")>0)> 
89		                		<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
90		                         	pageDetail = pageDetail[0..pageDetailPosition] 
91		                          	layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number) 
92		                      	/> 
93		                	</#if> 
94			            <#else> 
95			            	<#assign detailPage = "general" 
96			            	 		 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
97			            </#if> 
98			             
99			            <#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)    /> 
100	                    ${categoryUrl.setParameter("categoryId",categoryAncestor.getCategoryId()+"")} 
101	                 
102	                	<#if !(hideCategory?has_content && hideCategory)> 
103	                		<#if categoryAncestor.isRootCategory()> 
104		                		<#assign breadCrumbContent = "<li class='breadcrumb-item'><a href='/inicio'>"+categoryAncestor.getTitle(locale)+" </a> </li>"+breadCrumbContent/> 
105		                	<#else> 
106		                    	<#assign breadCrumbContent = "<li class='breadcrumb-item'><a href='"+categoryUrl+"'>"+categoryAncestor.getTitle(locale)+" </a> </li>"+breadCrumbContent/> 
107		                    </#if>	                   		 
108	                   	</#if> 
109                	</#if> 
110                </#foreach> 
111                 
112                ${breadCrumbContent} 
113                 
114            </#if> 
115             
116            <#assign hideCategory = false/> 
117            <#if assetCategoryPropertyService.getCategoryProperty(category.getCategoryId(),"idContenido") ? has_content > 
118			        	<#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(category.getCategoryId(),"idContenido")/> 
119			            <#assign contentId = contentIdProperty.getValue()/> 
120			            <#if contentId ? has_content> 
121			            	<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
122			        		 
123			        		<#if journalArticleSub?has_content> 
124				        		<#-- obtener el contenido de la categoría actual --> 
125				                <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
126                        		 	pageDetailNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
127                        		 	/> 
128                        		 <#if document.selectSingleNode("/root/dynamic-element[@name='visibleMigas']/dynamic-content")?has_content> 
129                        		 	<#assign visibleMigasNode =  document.selectSingleNode("/root/dynamic-element[@name='visibleMigas']/dynamic-content")  
130                        		 		visibleMigas =  visibleMigasNode.getText() 
131                        		 			 hideCategory = visibleMigas != "1"/> 
132                        		 </#if> 
133				        	</#if> 
134			 	        </#if> 
135			    	  
136			    	  
137				    	 <#if pageDetailNode?has_content && pageDetailNode.getText()?has_content> 
138			        		<#assign  pageDetail = pageDetailNode.getText()/> 
139			        		<#if (pageDetail?index_of("@")>0)> 
140		                		<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
141		                         	pageDetail = pageDetail[0..pageDetailPosition] 
142		                          	layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number) 
143		                      	/> 
144		                	</#if> 
145			            <#else> 
146			            	<#if category.isRootCategory()> 
147			            		<#assign detailPage = "inicio"/> 
148			            	<#else> 
149			            		<#assign detailPage = "general"/> 
150			            	</#if> 
151			            	 
152			            	<#assign layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
153			            </#if> 
154			             
155			            <#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)    /> 
156	                    ${categoryUrl.setParameter("categoryId",category.getCategoryId()+"")} 
157	                 
158	                	<#if !(hideCategory?has_content && hideCategory)> 
159	                		<#if category.isRootCategory()> 
160		                		<#if title?has_content> 
161		                			<li class="breadcrumb-item"><a href="/inicio">${category.getTitle(locale)}</a></li>		                		 
162		                		<#else> 
163		                			<li class="breadcrumb-item active">${category.getTitle(locale)}</li> 
164		                		</#if>  
165		                	<#else> 
166		                    	<#if title?has_content> 
167		                			<li class="breadcrumb-item"><a href="${categoryUrl}<#if imageId ? has_content>?imageId=${imageId}&title=${HtmlUtil.escapeURL(category.getTitle(locale))}</#if>">${category.getTitle(locale)}</a></li>		                		 
168		                		<#else> 
169		                			<li class="breadcrumb-item active">${category.getTitle(locale)}</li> 
170		                		</#if>  
171		                    </#if>	                		               		 
172	                   	</#if> 
173                	</#if> 
174        </#if> 
175        <#if title ? has_content> 
176        	<li class="breadcrumb-item active">${title}</li>  
177        </#if> 
178    </ol> 
179</nav> 
180 
181<script type="text/javascript"> 
182	$( document ).ready(function() { 
183		 if(typeof ga !== "undefined") { 
184		 <#if title ? has_content> 
185		 	var pageName = '${title}'; 
186		 <#elseif category ? has_content> 
187		 	var pageName = '${category.getName()}'; 
188		 <#else> 
189		 	var pageName = location.pathname; 
190		 </#if> 
191			     ga( 'send', 'pageview', { 
192				    'page': pageName, 
193				    'title': pageName 
194				} ); 
195
196	}); 
197</script> 

Publicador de contenidos

Publicaciones

Mostrando el intervalo 31 - 40 de 43 resultados.