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

List of links in category

Quote Reply
List of links in category
Hi,
I am looking for a plugin to display just the titles of the links on the current page.... So if I am displaying 20 links per page, the plugin would display just the 20 links on that page. I would like to insert this into the keyword metatag. It would also be nice if duplicate words were removed. Any help would be appreciated.

George
Quote Reply
Re: [macbethgr] List of links in category In reply to
You can edit the links.html to just show the title on the category page.

for the other stuff, you'd at least need a global, that would just loop through the links_loop variable, and push each word found in the Title field into a hash as a key, the value would be incremented by one for each time a word is found.

Then, you'd simply loop through the sorted hash (by value -- to put the most common words first (or last)) and insert the key into the meta string, return that string, and set it in the meta tag.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] List of links in category In reply to
Thanks,
I still want the links to show as normal on the page, so I dont think I would be able to use the link.html.... The other stuff is just a bit over my head for my experience level.... I will keep working at it....
Quote Reply
Re: [macbethgr] List of links in category In reply to
You could try;

<%global_name($ID)%>

... in category.html (with the meta_description stuff).

... and put the following code into a global;

Code:
sub {

my $ID $_[0];

my $table = $DB->table('CatLinks','Links');
my $sth = $table->( { CategoryID => $ID }, { isValidated => 'Yes' } ) || return $GT::SQL::error;

my @titles;

while (my $hit = $sth->fetchrow_hashref) {
push(@titles,$hit->{Title});
}

return join(",",@titles);

}

This is untested, and it is 8:30am, so please be warned that it may not work completly as it is meant to :)

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: Jun 28, 2004, 1:32 AM
Quote Reply
Re: [macbethgr] List of links in category In reply to
Couldn't you just use

<%loop links_loop%>
<%Title%>,
<%endloop%>

inside the metatag? Doesn't remove duplicate words but is easy to use.
Quote Reply
Re: [afinlr] List of links in category In reply to
Hi,

Some of my categories have thousands of links, would your method place only the titles of those links that are on the current page?

George
Quote Reply
Re: [macbethgr] List of links in category In reply to
I think so.
Quote Reply
Re: [afinlr] List of links in category In reply to
Thanks,

It works fine!

George