I assume you are using a multi-line text box (rather than the rich text editor). If so you will need to convert the line breaks to html <br/> tags. Something like this:
@Paul Haha, almost the same answer, ReplaceLineBreaks is a bit simpler to use though, I didn't even know it existed, but I though it'd be a common scenario, so I checked. :-) Learn something new every day.
Problem with display textbox multiple in XSLT
Hi All
I am using Umbraco 4.5.2 and have a textbox multiple in the document properties.
When I try to display the content in web page with XSLT, it ignores my "return" and keep all text in one line instead.
My xslt code is like below:
Can you help me with that?
Thank you
Jing
Jing,
I assume you are using a multi-line text box (rather than the rich text editor). If so you will need to convert the line breaks to html <br/> tags. Something like this:
<xsl:value-of select='umbraco.library:Replace($currentPage/quote, "
", "<br/>" )' disable-output-escaping='yes'/>
Well, as there is no HTML in a textbox, it will not convert simple line-breaks to a html "<br />" either.
But there's an XSLT extension for that! Try this:
@Paul Haha, almost the same answer, ReplaceLineBreaks is a bit simpler to use though, I didn't even know it existed, but I though it'd be a common scenario, so I checked. :-) Learn something new every day.
Thanks Sebastiaan, it works well for me.
is working on a reply...