Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Outputting text


Go to End


2 Posts   1610 Views

Avatar
r0ar

Community Member, 13 Posts

4 September 2008 at 11:10pm

So I have a function which returns some text.

The text has returns in it.

So I call the function through the template and it returns the text.
But..
the text no longer has returns.
Can someone help please!!!
Is this a CSS issue?

Avatar
Willr

Forum Moderator, 5523 Posts

5 September 2008 at 3:44pm

by returns do you mean new lines? if you want new lines you might need to return your text like this

return "this is a string\n with a new line inside it\n"