Fixed the Dev Diary

Posted written by Paul Seal on August 30, 2023 Umbraco

That was a simple fix.

I was able to fix the dev diary by editing the latest articles partial view.

Where I was getting the first article list page, I changed it to check if the current page is an article list already then use that, otherwise use the first one you can find.

Here is the code:

if(Model is not ArticleList articleList)
{
    articleList = UmbracoContext.Content.GetAtRoot().DescendantsOrSelf<ArticleList>().FirstOrDefault();
}

Updated latest articles partial view code