Gossamer Forum
Home : Products : Links 2.0 : Discussions :

how can I just add "description" on my Category page, but not the Category name?

Quote Reply
how can I just add "description" on my Category page, but not the Category name?
Smile Hey Guy!

Does anyone know how to add "Category Description" ONLY in the category.html but not the "Category name"? cause I don't want the Category name be displayed on the category.html page. I've thinking for a few days, but can't be solved. Anyone can help??
Quote Reply
Re: [soft2k] how can I just add "description" on my Category page, but not the Category name? In reply to
look in site_html_templates, in the sub site_html_print_cat, and find this bit:

Code:
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span class="descript">$description </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}


And change it to this:

Code:
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<span class="descript"><a href="$url">$description</a></span>| if (!($description =~ /^[\s\n]*$/));



}




That will print only the description, and make the whole description a link. You could change it to make an image a link, or whatever...


Leonard
aka PerlFlunkie
Quote Reply
Re: [soft2k] how can I just add "description" on my Category page, but not the Category name? In reply to
Also, Can I put "the number of links" after the description instead of after the category?
Quote Reply
Re: [soft2k] how can I just add "description" on my Category page, but not the Category name? In reply to
Put this after </span>:

Code:
<small class="numlinks">($numlinks)</small>


Leonard
aka PerlFlunkie