I believe I may have found the cause of this problem but I do not have a resolution.
Eclipse says "invalid location of tag "ul"" for the ul tag in the sub menu code ( In bold below)
<ul th:if="${#objects.nullSafe(category,default)}" class="sub-menu">
<li th:each="cat : ${category.getChildCategories()}">
<a th:text="${cat.name}" th:href="@{${cat.url}}" />
</li>
</ul>
I believe this is why the CSS sub-menu class is not getting applied to the submenu.
Could anyone offer a resolution for this probelm.
Code: Select all
<nav>
<div th:remove="all">
<!--
This template displays the navigation of the site by looking up the category named "Nav"
and building a list of the categories sub-categories.
-->
</div>
<blc:categories resultVar="navCategories" parentCategory="Primary Nav" maxResults="6" />
<ul>
<li th:each="category : ${navCategories}">
<a class="home" th:href="@{${category.url}}" th:class="${categoryStat.first}? 'home'" th:text="${category.name}"></a>
</li>
<ul th:if="${#objects.nullSafe(category,default)}" class="sub-menu">
<li th:each="cat : ${category.getChildCategories()}">
<a th:text="${cat.name}" th:href="@{${cat.url}}" />
</li>
</ul>
</ul>
</nav>