I'm sorry I know this is going to be a dumb question but I'm having trouble finding documentation on this. ive got a simple foreach running through items and I have a textbox multiple that I want to convert line breaks for each item.
In version 4 I would write @umbraco.library.ReplaceLineBreaks(item.alias) and it would work. That way isn't working anymore. I know that there is something like Umbrao.Field("alias", convertLineBreaks: true) but I'm not getting it. I'll post my code, if anyone could help I'd appreciate it. Thank you bunches!
the the content i have in the textbox multiple is literally just a string of text and I hit enter and wrote another line. there is no markup in these currently.
I don't know what was happening but it's working now. I did however finally find documentation on UmbracoHelper for .ReplaceLineBreaksForHtml(string text) which also works :) Thanks for your help!!!
convert line breaks in 7
I'm sorry I know this is going to be a dumb question but I'm having trouble finding documentation on this. ive got a simple foreach running through items and I have a textbox multiple that I want to convert line breaks for each item.
In version 4 I would write @umbraco.library.ReplaceLineBreaks(item.alias) and it would work. That way isn't working anymore. I know that there is something like Umbrao.Field("alias", convertLineBreaks: true) but I'm not getting it. I'll post my code, if anyone could help I'd appreciate it. Thank you bunches!
the the content i have in the textbox multiple is literally just a string of text and I hit enter and wrote another line. there is no markup in these currently.
Thank you!
Hi Blake
Perhaps the example shown, which is also marked as solution, in this post helps? http://our.umbraco.org/forum/developers/razor/39891-ReplaceLineBreaks-in-Razor?p=0#comment145788
Hope this helps.
/Jan
And here's another way it seems http://markdevelopmentblog.blogspot.dk/2013/09/umbraco-razor-add-line-breaks-to.html
/Jan
Thanks Jan!
I don't know what was happening but it's working now. I did however finally find documentation on UmbracoHelper for .ReplaceLineBreaksForHtml(string text) which also works :) Thanks for your help!!!
is working on a reply...