Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Adding line breaks to text display

Quote Reply
Adding line breaks to text display
I would like to take a list of information the user enters with line breaks, and have it display this same way - not as one big long paragraph (on detailed page). I don't know how or where to have it automatically add in <BR> marks.

For example, I'd like to have a list appear:

1 ladder
1 hammer
6 nails

But don't want it to show up like 1 ladder 1 hammer 6 nails

Any ideas would be very appreciated!

-Nancy

Quote Reply
Re: Adding line breaks to text display In reply to
Use regular expressions in the sub site_html_detailed routine in the HTML_Templates.pm file:

Code:

$rec->{'Description'} =~ s/\n/<BR>/g;


Regards,

Eliot Lee


Quote Reply
Re: Adding line breaks to text display In reply to
Thank you, thank you, thank you! That worked perfectly.

Quote Reply
Re: Adding line breaks to text display In reply to
You're welcome.

Regards,

Eliot Lee

Quote Reply
Re: Adding line breaks to text display In reply to
Thanks Anthrorules i needed code 2 for later when i have data to import :)..

Can you take a look at (i am still waiting for your answer, eh more then 10 minutes now:)):

http://gossamer-threads.com/...w=collapsed&sb=5.

Allready thanks...

Regards Startpoint.

Quote Reply
Re: [Stealth] Adding line breaks to text display In reply to
I'd like to do this, but I can't locate the HTML_templates.pm file. I'm using the file manager as I don't want to shell or FTP into the files as I did that once and screwed it up and had to reinstall the whole program.