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

Short description ... read more

Quote Reply
Short description ... read more
Hi, All

I am using this global to show the short description of the link.
######################################
sub {
my $tags = shift;
my $desc = $tags->{Description} or return "No description on this template";
length $desc < 300 and return $desc;
my $short = substr ($desc, 0, 300);
$short =~ s/\s\S+?$//;
$short .= "<b> ... read more</b>";
return $short;
}
#####################################


What I want is at the end of the short description a "read more" hyperlink to a detailed page. I tried <%detailed_url%> but that doesn't work. And "read more" must also work when there are less than 300 characters in my example.


Thanks all.
Ron
Subject Author Views Date
Thread Short description ... read more rsahertian 2852 Feb 24, 2004, 11:09 AM
Thread Re: [rsahertian] Short description ... read more
Andy 2824 Feb 24, 2004, 11:18 AM
Thread Re: [Andy] Short description ... read more
rsahertian 2817 Feb 24, 2004, 11:45 AM
Thread Re: [rsahertian] Short description ... read more
afinlr 2792 Feb 24, 2004, 2:08 PM
Thread Re: [afinlr] Short description ... read more
Andy 2802 Feb 24, 2004, 2:19 PM
Thread Re: [Andy] Short description ... read more
Payooo 2791 Feb 24, 2004, 6:12 PM
Thread Re: [Payooo] Short description ... read more
Andy 2768 Feb 25, 2004, 1:29 AM
Thread Re: [Andy] Short description ... read more
Payooo 2770 Feb 25, 2004, 3:05 AM
Thread Re: [Payooo] Short description ... read more
Andy 2756 Feb 25, 2004, 3:09 AM
Post Re: [Andy] Short description ... read more
Payooo 2744 Feb 25, 2004, 3:13 AM