Parse textrows (separated with line breaks) as items
Hi!
I have a textbox multiple where the editors are supposed to enter textlines with ordinary line breaks. Is there some way I can split the rows transforming them to <ul><li>'s, like this?
It is without doubt easier to do this from C# that in xslt. But you can try if you can get the umbraco.library.Split(string StringToSplit, string Separator) method to split on the linebreaks by using "\r\n" or "\n" as a separator. This will get you some xml like
Parse textrows (separated with line breaks) as items
Hi!
I have a textbox multiple where the editors are supposed to enter textlines with ordinary line breaks. Is there some way I can split the rows transforming them to <ul><li>'s, like this?
"First row
Second row
Third row"
to
<ul><li>First row</li><li>Second row</li><li>Third row</li></ul>
Can I do this without c#?
Regards / Jonas
It is without doubt easier to do this from C# that in xslt. But you can try if you can get the umbraco.library.Split(string StringToSplit, string Separator) method to split on the linebreaks by using "\r\n" or "\n" as a separator. This will get you some xml like
Brilliant!
Thanks Morten
is working on a reply...