Gossamer Forum
Home : Products : Gossamer Links : Discussions :

showing related categories

Quote Reply
showing related categories
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


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

Last edited by:

socrates: Nov 10, 2007, 8:59 PM
Quote Reply
Re: [socrates] showing related categories In reply to
Can anyone please explain this? What is the related loop supposed to do and how do I print categroies first and related below (seperately)?

Thanks
Quote Reply
Re: [socrates] showing related categories In reply to
There is an option build_category_yahoo in Links Setup. I guess it is "Yes", but should be "No".

Regards

Merten