Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Category (0) question

Quote Reply
Category (0) question
Okay, is there a way to set up the pages so if there aren't any links under that category the (0) doesn't show? The reason why is because one of my categories is merely a cross-reference category and has nothing but Related categories under it. Which means that the (0) shows 0 links and that might keep people from looking at it. Ideally, I'd like to set it up so that the (0) doesn't show if there is a 0 in it. If that isn't possible, can I set up the site so that no (0) show up on the home page but does show up on the other pages?
Quote Reply
Re: [rayhne] Category (0) question In reply to
Hi
in subcategory.html

Replace your :
<%Number_of_Links%> global

With:

<%if Number_of_Links < 1%>
<%endif%>
<%if Number_of_Links > 0%>
<small><class="numlinks"> (<%Number_of_Links%>)</small>
<%endif%>

and that should do it.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Category (0) question In reply to
I think you can use else:

<%if Number_of_Links < 1%>
<%else%>
<small><class="numlinks"> (<%Number_of_Links%>)</small>
<%endif%>

Last edited by:

RedRum: Nov 8, 2001, 11:25 AM
Quote Reply
Re: [rayhne] Category (0) question In reply to
in subcategory.html try:

<%if Number_of_Links ne '0'%>(<%Number_of_Links%>)<%endif%>

--
Matt G
Quote Reply
Re: [RedRum] Category (0) question In reply to
Hi,
yes you are right
that should do the same.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Category (0) question In reply to
Haha Matt beat us both :)

Except I can beat that:

<%if Number_of_Links > 0%>(<%Number_of_Links%>)<%endif%>

Angelic

Last edited by:

RedRum: Nov 8, 2001, 11:37 AM
Quote Reply
Re: [RedRum] Category (0) question In reply to
hehe...

how about this:

<%if Number_of_Links%>(<%Number_of_Links%>)<%endif%>

Tongue

--
Matt G
Quote Reply
Re: [mglaspie] Category (0) question In reply to
Oooo you meanie.

I can't beat it. Laugh

Last edited by:

RedRum: Nov 8, 2001, 11:49 AM
Quote Reply
Re: [RedRum] Category (0) question In reply to
Sly

Well, actually, it would probably be better written as:

<%if Number_of_Links%>
<small><class="numlinks">(<%Number_of_Links%>)</small>
<%endif%>

As then there won't be any "dangling" html tags (i.e. <small> and <class>)...

(Assuming rhayne is using those default tags.)

Wink

--
Matt G
Quote Reply
Re: [mglaspie] Category (0) question In reply to
I am using default tags....so this goes into the which page?
Quote Reply
Re: [rayhne] Category (0) question In reply to
.../admin/templates/default/subcategory.html

--
Matt G