Gossamer Forum
Home : Products : Gossamer Links : Discussions :

show number of links in related categories?

Quote Reply
show number of links in related categories?
Hello,

I have yahoo stlye related categories turned off, and have been trying to figure out how to have the number of links appear after the related category names. I've seen a few old posts related to this issue, but am not sure that they would help with the newest Links.

At first I tried changing <ul><%related%></ul> to <ul><%related%><small><i>(<%Number_of_Links%>)</i></small> in category.html, but this didn't quite work since there are in some cases several related categories, and the template didn't allow the <li> and </li> tags.

In build.pm around line 623 I found:

$display{related} .= qq~<li><a href="$url">$rel_name</a></li>~;

I'd like to add something like <small><i>($Number_of_Links)</i></small> after $rel_name but since I'm relatively new to perl, I'm not quite sure where and how to define Number_of_Links

I've tried inserting $Number_of_Links = $category->{'Number_of_Links'}; in a number of places, but obviously the syntax and/or positioning is faulty.

Am I on the right path? Does anyone have a solution?

Thanks
Subject Author Views Date
Post show number of links in related categories? ronzo 980 Jan 23, 2003, 1:06 PM