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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...