Navegación por categorías

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> currentCategoryId  [in template "20099#20135#137620" at line 45, column 26]

----
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: #if currentCategoryId == category.get...  [in template "20099#20135#137620" at line 45, column 21]
----
1<#assign  
2    assetCategoryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil"] 
3/> 
4<!-- Recuperar valores de las preferencias del portlet --> 
5<#list portletPreferences?keys as preference> 
6    <#if portletPreferences[preference] ??> 
7        <#assign mapValues = portletPreferences[preference] /> 
8        <#list mapValues as value > 
9            <#if preference == "assetVocabularyIds"> 
10                <#assign assetVocabularyIds = value /> 
11            </#if> 
12        </#list> 
13    </#if> 
14</#list> 
15<!--  
16    Vamos a comprobar si viene categoryId. Esto quiere decir que viene de una petición para mostrar todas las entradas de  
17    una categoría 
18    Si es así pintamos el título como el de la categoría 
19--> 
20<#attempt> 
21    <#if assetVocabularyIds??> 
22        <#assign  childCategoriesVocabulary = assetCategoryLocalServiceUtil.getVocabularyRootCategories(assetVocabularyIds?number, -1, -1, null) /> 
23    </#if> 
24    <#if renderRequest.getParameter("categoryId")??> 
25        <#assign  
26            currentCategoryId = renderRequest.getParameter("categoryId")?number 
27            currentCategory = assetCategoryLocalServiceUtil.getCategory(currentCategoryId) 
28            childCategories = assetCategoryLocalServiceUtil.getChildCategories(currentCategoryId) 
29        /> 
30    </#if> 
31<#recover> 
32     
33</#attempt> 
34 
35<div class=""> 
36    <div class="container2"> 
37        <div style=""> 
38            <span>Preguntas Frecuentes en la categor&iacute;a:</span>&nbsp; 
39            <#if childCategoriesVocabulary?? && childCategoriesVocabulary?has_content> 
40                <#assign categories = childCategoriesVocabulary> 
41                <select id="selectCategoyId"> 
42                <#list categories as category> 
43                    <#assign childCategories = assetCategoryLocalServiceUtil.getChildCategories(category.getCategoryId()) /> 
44                    <#assign selected="" /> 
45                    <#if currentCategoryId == category.getCategoryId()> 
46                    <#assign selected="selected" /> 
47                    </#if> 
48                    <option ${selected} value="${category.getCategoryId()}">${category.getName()}</option> 
49                    <#list childCategories as categoryChild> 
50                        <#assign selected="" /> 
51                        <#if currentCategoryId == categoryChild.getCategoryId()> 
52                        <#assign selected="selected" /> 
53                        </#if> 
54                        <option ${selected} value="${categoryChild.getCategoryId()}">-- ${categoryChild.getName()}</option> 
55                    </#list> 
56                </#list> 
57                </select> 
58            </#if> 
59        </div> 
60    </div> 
61</div> 
62 
63<script> 
64    $('#selectCategoyId').on('change', function () { 
65        console.log($(this).val()); 
66        <#assign categoryURL = renderResponse.createRenderURL()> 
67		${categoryURL.setParameter("resetCur", "true")} 
68		${categoryURL.setParameter("categoryId", "categoryIdValue")} 
69		var url = "${categoryURL}"; 
70		url = url.replace("categoryIdValue", $(this).val()); 
71		console.log(url); 
72		window.location.href = url; 
73    }); 
74</script> 

Publicador de contenidos

Prestadores servicios Sociedades y Fideicomisos