Gossamer Forum
Quote Reply
Global change
Hello

We are using the following global to auto generate keyword listings for categories without one in the database.

sub {
# inserts the category anme as a keyword.
my $vars = shift;
my $cat = $vars->{category_name};
$cat =~ s|/|, |g;
return $cat;
}

It generates a listing like ", keyword, keyword1, keywor2,..."

The problem that just came up is that some search engines and FFA pages ignore the page when the keywords meta starts with a ","..

Can the above global be amended to generate the same listing but skip the , at the start of the meta tage?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory

Last edited by:

katabd: Oct 31, 2006, 6:30 AM
Quote Reply
Re: [katabd] Global change In reply to
Hi ,

the below should work

Code:
sub {
# inserts the category anme as a keyword.
my $vars = shift;
my $cat = $vars->{category_name};
$cat =~ s/^\///g;
$cat =~ s|/|, |g;
return $cat;
}

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog