Gossamer Forum
Quote Reply
Shorten the Title
Heya ll,

Been trying to hack together a little global that will do nothing but take the title from a link and shorten it to however long I want it to be. Not working that well - but then I also know next to nothing about writing globals - can anyone help? Smile

Code:
sub {
my $link = $_[0];
if (length $link->{Title} > 20) {
$link->{Title} = substr($link->{Title}, 0, 20) . '...';
}
return $Title;
}

Safe swoops
Sangiro
Subject Author Views Date
Thread Shorten the Title sangiro 1838 Jul 2, 2004, 4:20 AM
Thread Re: [sangiro] Shorten the Title
minesite 1753 Jul 2, 2004, 5:16 AM
Post Re: [minesite] Shorten the Title
Andy 1748 Jul 2, 2004, 6:40 AM