I am trying to create a news section on my frontpage (Home) umbraco site. My idea is to keep the news content apart from the site content in a folder like this:
Home
News
But how can I get the news content into my (home) page, when it's not in the same folder?
Please help.
If you're using XSLT then you'd do this:
<xsl:for-each select="$currentPage/ancestor-or-self::root/News/NewsItem">
<!-- do whatever here -->
</xsl:for-each>
If you're doing Razor syntax, then use:
@foreach (var newsitem in Library.NodeById(-1).Descendants("News").ChildrenAsList) {
// Your processing/rendering code in here
}