Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Klaus Bergh 8 posts 76 karma points
    Jan 11, 2016 @ 13:11
    Klaus Bergh

    Tutorial for using list view for creating a news page


    I am new to umbraco, but i hope someone can help me creating a simple newspage

    What i think is a page with the headlines listet, and when my user click this headline they will se the full history.

    Is this possible?

  • Dennis Aaen 4495 posts 18202 karma points admin hq c-trib
    Jan 11, 2016 @ 13:20
    Dennis Aaen

    Hi Klaus,

    Yes this is possible. What you need to do is is to creating a document type for a News overview page, if you want this and then a document type for the news item.

    See this video chapter of how Umbraco document types are working in Umbraco.

    When this is in place then you need to write some code to get the data out. It could be Razor. In Umbraco you will find some Razor pre-code snippets, and if you are doing the setup with an overview page where you have the news items as children, then you can use the Razor code below.

    @{ var selection = CurrentPage.Children.Where("Visible"); }
    @if (selection.Any())
            @foreach (var item in selection)
                    <a href="@item.Url">@item.Name</a>

    With this could will get the node name of the news item and a link to the news item. If you have some custom properties then you can call it regarding to the example above @item.AliasOfCustomProperty.

    Hope this helps and make sense, if not donĀ“t hessite to ask again.


  • Dennis Aaen 4495 posts 18202 karma points admin hq c-trib
    Jan 11, 2016 @ 13:22
    Dennis Aaen

    Another thing you could do is setup another Umbraco installation with the TXT starter kit installed.

    This starter kit has news section where it shows news items, as children to the news overview page.

    Hope this can help too.


  • Casper Andersen 126 posts 508 karma points
    Feb 03, 2016 @ 10:40
    Casper Andersen

    I have made some tutorials on youtube and one of them is about how to make a list of news items, i am still making tutorials when i can, perhaps these can help you out.

Please Sign in or register to post replies

Write your reply to: