Hello,
In my category pages, the related categories and subcategories are all shown together and sorted alphabetically.
I have the following in category.html but the related categories portion does not really print any related catgeories below but instead related categories are printed together with all the other subcategories.
I want to show the subcategories first and then at the bottom of the subcategories show the related categories and don't want to group them together. How can I do this?
Example:
Categories:
Travel
Hotels
Restaurants
Related Categories:
Entertainment
Golf
<%if category_loop.length~%>
<h3> Categories</h3>
<%~set split = Links::Utils::column_split($category_loop.length, $category_cols)%>
<div class="clear">
<%loop category_loop%>
<%~set splitmod = $row_num % $split%>
<%~if row_num == 1 or splitmod == 1 or split == 1%><dl><%endif%>
<%~include subcategory.html%>
<%~if row_num == $category_loop.length or splitmod == 0%></dl><%endif%>
<%~endloop%>
</div>
<%if related_loop.length~%>
<h3>Related Categories</h3>
<ul>
<%~loop related_loop%>
<li><a href="<%escape_html URL%>"><%Full_Name%></a></li>
<%~endloop%>
</ul>
<%endif%>
Thanks
In my category pages, the related categories and subcategories are all shown together and sorted alphabetically.
I have the following in category.html but the related categories portion does not really print any related catgeories below but instead related categories are printed together with all the other subcategories.
I want to show the subcategories first and then at the bottom of the subcategories show the related categories and don't want to group them together. How can I do this?
Example:
Categories:
Travel
Hotels
Restaurants
Related Categories:
Entertainment
Golf
Code:
<%if category_loop.length~%>
<h3> Categories</h3>
<%~set split = Links::Utils::column_split($category_loop.length, $category_cols)%>
<div class="clear">
<%loop category_loop%>
<%~set splitmod = $row_num % $split%>
<%~if row_num == 1 or splitmod == 1 or split == 1%><dl><%endif%>
<%~include subcategory.html%>
<%~if row_num == $category_loop.length or splitmod == 0%></dl><%endif%>
<%~endloop%>
</div>
<%if related_loop.length~%>
<h3>Related Categories</h3>
<ul>
<%~loop related_loop%>
<li><a href="<%escape_html URL%>"><%Full_Name%></a></li>
<%~endloop%>
</ul>
<%endif%>
Thanks