Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6529053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:35:35+00:00 2026-05-25T09:35:35+00:00

I’m trying to create a news archive in umbraco, where it would display a

  • 0

I’m trying to create a news archive in umbraco, where it would display a list of news pages organised by month. Each page would display a listing of the news items of that month.

I’ve followed the tutorial for creating news items, but I’m not sure how to create an archive. There doesn’t seem to be any references to do this online either. Surely it’s a common use case for the CMS.

Anyone have any ideas (preferably in razorscript if coding is required)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:35:36+00:00Added an answer on May 25, 2026 at 9:35 am

    I ended up using the datefolders package, which automatically sorts the news items into the correct year and month folder based on a predefined date field, much like @amelvin response. The benefit of datefolders is that it simplifies the user having to manually sort their articles into the right folder and maintain that organisation. They can just right click the news container item, create the article, set the date, and it’ll just appear in the right folder. Also, it changes the folder when the date is changed.

    In terms of the display of the archives, I had the following razor code, where NewsListing is the news items listing document type, and NewsItem is the news item document type:

    Archive listing in the sidebar

    <umbraco:Macro runat="server" language="cshtml">
    @{
      dynamic newsListingNode = Model.AncestorOrSelf(1).DescendantsOrSelf("NewsListing").First();
    }
    <div class="archive">
      <ul>
        @foreach (var newsYear in newsListingNode.Children)
        {
          foreach (var newsMonth in newsYear.Children)
          { 
            @* Use format time to get the month string *@
            dynamic dateLabel = umbraco.library.FormatDateTime(newsYear.Name + " " + newsMonth.Name + " 01", "MMMM yyyy");
    
            <li><a href="@newsMonth.Url">@dateLabel»</a></li>
          }
        }
      </ul>
    </div>
    </umbraco:Macro>
    

    Month archive page

      <umbraco:Macro runat="server" language="cshtml">
        @* Check the it is a month folder *@
        @if ((@Model.NodeTypeAlias == "NewsDateFolder") &&
             (@Model.Up().NodeTypeAlias == "NewsDateFolder") &&
             (@Model.Up().Up().NodeTypeAlias == "NewsListing")) 
        {
            dynamic newsMonth = Model;
            dynamic newsYear = Model.Up();
    
            dynamic dateLabel = umbraco.library.FormatDateTime(newsYear.Name + " " + newsMonth.Name + " 01", "MMMM yyyy");
    
            <div class="news">
              <h2>News archive: @dateLabel</h2>
              @{
                dynamic newsItems = Model.DescendantsOrSelf("NewsItem").OrderBy("sortDate desc");
              }
              @foreach(var newsItem in newsItems) {
                <div class="block-content">
                  <h5><a href="@newsItem.Url">@newsItem.Name</a></h5>
                  <p>@newsItem.summaryText</p>
                  <a href="@newsItem.Url">more»</a>
                </div>
              }
            </div>
    
        }
      </umbraco:Macro>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
In my XML file chapters tag has more chapter tag.i need to display chapters
I would like to run a str_replace or preg_replace which looks for certain words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.