I am using the embbeded content data type, but can't work out how to find the number of items added to the control. Basically I only want to show some markup if the number of items is greater than 0. I know it is probably really simple but just can't work out how to navigate the model to get the count. An example of what I am doing is shown below.
@{ //if(count of item is greater than 0) //{ <div class="columnContent" style="margin-bottom:0px;padding-bottom:0px;"> <ul id="delivers"> @foreach (dynamic item in Model.optaDeliversTicker) { <li> <h2 class="testFeed">@item.optaDeliversNumber.InnerText.ToString()</h2> <p class="sportData">@item.optaDeliversText.InnerText.ToString()</p> </li> } </ul> </div> //} }
Embedded Content data type
I am using the embbeded content data type, but can't work out how to find the number of items added to the control. Basically I only want to show some markup if the number of items is greater than 0. I know it is probably really simple but just can't work out how to navigate the model to get the count. An example of what I am doing is shown below.
Any help would be great.
is working on a reply...