So I'm making a list template for Sitefinity's document widget. The documents are in a library that is located in another library and I want to display that sub library name at the top of the list. The thing is I cant get that sub library name I can only get the parents name. This will make more sense id you see the screenshots. I would like to have "Child Library" as the title, but can't figure it out.
<ul class="simpleZebraList @Model.CssClass">
@if (Model.Items.Count() > 0)
{
var firstItem = Model.Items.First();
<h4>@firstItem.Fields.Parent.Title</h4>
}
@foreach (var item in Model.Items)
{
<li>
<div class="title">@item.Fields.Title</div>
<div class="link">
<a class="cta" href="@item.Fields.MediaUrl" target="_blank">Download</a>
</div>
</li>
}
@if (Model.ShowPager)
{
@Html.Action("Index", "ContentPager", new
{
currentPage = Model.CurrentPage,
totalPagesCount = Model.TotalPagesCount.Value,
redirectUrlTemplate = ViewBag.RedirectPageUrlTemplate
})
}