Skip to main content
Kinetic Community

Christmas Bonus

Screen Shot 2016-05-05 at 12.08.38 PM.png


  1. Create foundation data

  2. Add page and remove code block

  3. Add new code

  4. Add a partial

Create the foundation data

  1. Create the following categories: “Hardware”, “Software”, “Applications”, “Laptops”, and  “Desktops”
  2. Create category Attribute Definition: “Parent”
  3. Add the “Parent” attribute to “Applications” and enter “software” for the Value. Save the category.
  4. Add the “Parent” attribute to both “Laptops” and  “Desktops” and enter “hardware” as the Value. Save the category.

Add the page that will hold your categories and remove code block

  1. In the pages directory, copy the categories.jsp page and name the copy nested.jsp.
  2. Do a search for grid.
  3. Highlight and remove everything between the div's (including the div's that have the class "grid".)
<div class="grid">
    <c:forEach var="category" items="${kapp.categories}">

 Add new code

  1. Add the following code where you removed the last block:
    <c:forEach var="category" items="${CategoryHelper.getCategories(kapp)}">
                <%-- Recursive Subcatgegories --%>
                <c:set scope="request" var="currentCat" value="${category}"/>
                <c:import url="${bundle.path}/partials/subCategory.jsp" charEncoding="UTF-8" />
  1. Save the file.

Add the partial that will display your subcategories:

  1. In the partials directory, copy the categoryNav.jsp and name the copy subCategory.jsp.
  2. Find this line at top of the file.
<%@include file="../bundle/initialization.jspf" %>
  1. Remove everything below the line you found in step 2.
  2. Add the following code.
<c:forEach var="subcategory" items="${currentCat.getSubcategories()}">
            <c:set var="currentCat" value="${subcategory}" scope="request"/>
            <jsp:include page="subCategory.jsp"/>
  1.  Save the file.