Order children based on listview settings in front-end
Hi,
I was wondering if it is possible to access listview settings of PublishedContent?
An example:
Listview settings for news items, that are ordered descending by 'Date' field
Printing news items will use 'sortOrder' by default:
var current = Umbraco.AssignedContentItem;
var children = current.Children<ContentModels.NewsDetailPage>();
foreach (var child in children)
{
<div class="news-item">
@{
...
}
</div>
}
I would like to re-use my @foreach for several other types of pages with children. Each with a different order field setting. So is it possible to access the settings?
Order children based on listview settings in front-end
Hi,
I was wondering if it is possible to access listview settings of PublishedContent?
An example:
Listview settings for news items, that are ordered descending by 'Date' field
Printing news items will use 'sortOrder' by default:
It is possible to order these by 'Date'
I would like to re-use my @foreach for several other types of pages with children. Each with a different order field setting. So is it possible to access the settings?
Thanks for any advice.
is working on a reply...