I would love to make a list of timeline elements based on multiple document types:
Normal timeline elements (i.e. news - new and archived) and cases.
I am very, very new to Razor, and tried to write this:
@{
// Get root node:
var root = Model.AncestorOrSelf();
// Get all descendants, filter by type:
var nodes = root.Descendants("Timeline | Case");
// Loop through the filtered nodes, displaying the properties:
<ul>
@foreach (var node in nodes)
{
<li>
<h2>@node.pageTitle</h2>
</li>
}
</ul>
}
Umbraco 4.8, .NET 4.0
Best regards
Kim
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/33822-create-a-timeline-based-on-multiple-document-types