Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Troja] new line in DESCRIPTION

Quote Reply
Re: [Troja] new line in DESCRIPTION In reply to
Hi-

You can create a new Global by going to the Build in the admin, and then selecting the Template Globals link. Then you would add a new one called:

Description_Formatted =>

And Add this code:


Code:
sub {
my $tags = shift;
my $description= $tags->{Description};
$description=~ s/\n/<BR>\n/g;
$description= GT::CGI::html_escape($description);
return $description;
}

and then use <%Description_Formatted%> on your template instead of <%Description%>, and then it will keep the line breaks that people put in when they entered their information.

-FrankM

Last edited by:

FrankM: Mar 22, 2002, 2:47 PM
Subject Author Views Date
Thread new line in DESCRIPTION Troja 2326 Mar 22, 2002, 2:29 PM
Thread Re: [Troja] new line in DESCRIPTION
FrankM 2272 Mar 22, 2002, 2:42 PM
Post Re: [FrankM] new line in DESCRIPTION
Troja 2260 Mar 22, 2002, 3:10 PM
Thread Re: [FrankM] new line in DESCRIPTION
4x4search 2181 Sep 25, 2004, 4:16 PM
Post Re: [4x4search] new line in DESCRIPTION
FrankM 2166 Sep 27, 2004, 9:40 AM