Wondered if anybody could help, I have a list of news articles which are nested individual below a page node, they render on the site fine, but because of the amount of articles I want to render them within dte folders like this:
But when I do the news artciles dont't render on the page anymore, there are no error messages, here is the code on the page, can anybody help please:
I notice on line 9 of your code snippet, you use Model?.Children<NewsArticlePage>(). Children are only the pages directly below your overview page. If you want to get the news detail pages, you'll want to use Model?.Descendants<NewsArticlePage>().
Nest news article nodes within date folder
Hi,
Wondered if anybody could help, I have a list of news articles which are nested individual below a page node, they render on the site fine, but because of the amount of articles I want to render them within dte folders like this:
But when I do the news artciles dont't render on the page anymore, there are no error messages, here is the code on the page, can anybody help please:
Kind regards
Nick
Hi Nick,
I notice on line 9 of your code snippet, you use
Model?.Children<NewsArticlePage>()
. Children are only the pages directly below your overview page. If you want to get the news detail pages, you'll want to useModel?.Descendants<NewsArticlePage>()
.Kind regards,
Dennis
Many thanks Dennis,
Just tried that and it works great, many thanks
Nick
is working on a reply...