Hi,
right now I'm using the following code to get items from a specific node
@{
dynamic node = new umbraco.MacroEngines.DynamicNode(1059);
}
<div class="articleList">
<ul>
@foreach (var page in node.Children.Where("Visible").OrderBy("UpdateDate desc").Take(5))
{
This works fine, but is there a way that I can have several sources combined into one list. For instance if I want to get the top 3 posts from two different nodes.
Foreach from multiple nodes?
Hi, right now I'm using the following code to get items from a specific node
This works fine, but is there a way that I can have several sources combined into one list. For instance if I want to get the top 3 posts from two different nodes.
Thanks / Niklas
Hi Niklas,
What version of Umbraco are you using and is this code snippet from a View (in /Views folder)?
Jeavon
I'm using version six and the code snippet is from a macroscript (cshtml)
is working on a reply...