Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

problem with <%number_of_links%> tag

Quote Reply
problem with <%number_of_links%> tag
I am using the <%number_of_links%> tag in the subcategory.html template that shows the number of "links" within a subcategory. However, the number it outputs is wrong. Anybody know why this might be?

For example, it outputs say 18 'links' but if you go to that subcategory there are MORE than 18 links.

Anybody experience this problem?
Quote Reply
Re: [scorpioncapital] problem with <%number_of_links%> tag In reply to
Try running this in SSH;

perl nph-build.cgi --repair

This will re-generate the category counts. Stuff like this does happen when you have a lot of links being put in/ taken out etc I'm afraid.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Dec 19, 2003, 8:03 AM
Quote Reply
Re: [Andy] problem with <%number_of_links%> tag In reply to
You mean that a build_changed does not work as well as a build_all?
Quote Reply
Re: [scorpioncapital] problem with <%number_of_links%> tag In reply to
Did I say that? Wink

The category counts are kept in the 'Number_of_Links' field in lsql_Category. Sometimes, when you add a lot of links (and remove links), the category doesn't get updated correctly with the new links count. Running Build > Repair Tables, or perl nph-build.cgi --repair via SSH should sort this out.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!