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

Global formatting question

Quote Reply
Global formatting question
Using the following global:

sub {
my $tags = shift;
my $desc = $tags->{Description} or return "No description on this template";
length $desc < 100 and return $desc;
my $short = substr ($desc, 0, 500);
$short =~ s/\s\S+?$//;
$short .= " ...";
return $short;
}

and pulling it with <%short_desc%>

to get a short description of the link to post on the subcategory pages... Works fine unless there is a table or a list <li> in the link, and then the remnants of the table offsets my existing tables in my category.html...
Is there a way to force the results of <%short_desc%> to stay within the format of the exisiting table in the category.html without messing up the exisiting tables...

</not a clue>

Last edited by:

Dinky: Jul 12, 2004, 3:13 PM