Im having a bit of trouble with a list of media items, where the editor deletes the file from the medialibrary. It should then stop appearing in the list, but it stays there as an empty reference. So it seems "RemoveEmptyEntriest" doesn't kick in... Any idea what i may be doing wrong?
Code:
@{
if (fieldset.HasValue("filer"))
{
var boxListValue = fieldset.GetValue<string>("filer");
var boxList = boxListValue.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
<ul>
@{
foreach (var item in boxList)
{
<li><a href="@Umbraco.Media(@item).Url" target="_blank">
@Umbraco.Media(@item).Name</a>
</li>
}
}
</ul>
}
}
RemoveEmptyEntries not working
Im having a bit of trouble with a list of media items, where the editor deletes the file from the medialibrary. It should then stop appearing in the list, but it stays there as an empty reference. So it seems "RemoveEmptyEntriest" doesn't kick in... Any idea what i may be doing wrong?
Code:
fixed it.
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.