Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Umbracos
Im trying to get this MultipleTextstring to show as an Comma Separated list. Code working – just missing the commas?
@{ if (Model.Content.GetPropertyValue<string[]>("tags").Length > 0) { foreach (var tag in Model.Content.GetPropertyValue<string[]>("tags")) { @tag } } }
Hi
once you have the tags in an array you can use string.Join to put the comma in
var tags = Model.Content.GetPropertyValue<string[]>("tags") @string.Join(", ", tags);
will add , (and space) between each item in the list
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Umbraco.MultipleTextstring » Comma separated
Hi Umbracos
Im trying to get this MultipleTextstring to show as an Comma Separated list. Code working – just missing the commas?
Hi
once you have the tags in an array you can use string.Join to put the comma in
will add , (and space) between each item in the list
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.