Gossamer Forum
Home : Products : Links 2.0 : Customization :

Number before link in a category

Quote Reply
Number before link in a category
Hey,

I will have a number before a link in a category and this for every category new...
category1 ... No 1 link xyz
...
No 99 link abc
...
category999 ... No 1 link 123
...
No 999 link 456

Thankx for help...

C'ya
Martin Ackermann

------------------
http://www.schmetterling.nu
Quote Reply
Re: Number before link in a category In reply to
Why you would want to do this, I do not understand. Nevertheless, this is how I would do it.

In links.cfg, under the "Build Globals" section, I would add the following variable and initialize it to zero:

$linknum = "0";

Then, in site_html:

In "sub site_html_link" add the following immediately below the "my ..." lines:

$linknum++;

That will increment the link count for each link displayed. In the same subroutine, change:

$output = qq|
<ul type=disc><li><$font><a href="$build_jump_url?$db_key=$rec{$db_key}">$rec{'Title' }</a></font>|;

to read:

$output = qq|
<ul type=disc><li><$font>No $linknum Link <a href="$build_jump_url?$db_key=$rec{$db_key}">$rec{'Title' }</a></font>|;

In "sub site_html_category":

Add the following immediately after the "my ($output);" line:

$linknum = "0";

That will reinitialize the link number back to zero for each category. If you do not desire to reset the link number back to zero for each category, then just ignore this change.

Is this what you are looking for?


------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
goodstufflists.home.ml.org/


[This message has been edited by Bobsie (edited December 07, 1998).]
Quote Reply
Re: Number before link in a category In reply to
Hey,

That's it!
Thank you !

C'ya
Martin Ackermann

------------------
http://www.schmetterling.nu