Hi I am using foreach loop to render fields in Item publisher module. It renders the fields data but along with it it also renders a lot of empty fields as you can see it in a attached PNG.
I am pretty sure there is something very wrong with my loop construction, and I am not sure what that is here is the loop
<div class="items">
@if (@GetBoolean("ItemPublisher:Items.Any") == true)
{
<ul class="items-list" style="text-align:center; color:white">
@foreach (LoopItem i in GetLoop("ItemPublisher:Items.List")){
<li class="items-list-row items-clear">
@foreach (LoopItem field in i.GetLoop("ItemPublisher:Item.Fields"))
{
<span class="event-place">
@if (!string.IsNullOrEmpty(@field.GetString("ItemPublisher:Item.EPlace")))
{
@field.GetString("ItemPublisher:Item.EPlace")
}
</span>
<span class="event-date">
@if (!string.IsNullOrEmpty(@field.GetString("ItemPublisher:Item.EDate")))
{
@field.GetDate("ItemPublisher:Item.EDate").ToString("dd.") @field.GetDate("ItemPublisher:Item.EDate").ToString("MMM")
}
</span>
<span class="event-time">
@if (!string.IsNullOrEmpty(@field.GetString("ItemPublisher:Item.ETime")))
{
@field.GetString("ItemPublisher:Item.ETime")
}
</span>
}
</li>
}
</ul>
}
</div>
any suggestions? thanks
Best Regards
Aditya Bante