Copied to clipboard

Flag this post as spam?

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


  • Mike Trillwood 3 posts 83 karma points
    Apr 21, 2016 @ 16:13
    Mike Trillwood
    0

    Repeatable content area

    Hi,

    I'm new to Umbraco but understand MVC and am currently looking at setting a website up that allows multiple news stories under a page.

    I've been following the solution as shown here

    Now everything is working but I don't understand what I need to do to actually put in the parent pages template to get it to repeat the child articles?

    Any help would be appreciated. Mike

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 22, 2016 @ 06:42
    Dave Woestenborghs
    0

    Hi Mike,

    Can you show us how your documenttypes and content tree are set up. That would be easier to show your some code to achieve your goal.

    Dave

  • Mike Trillwood 3 posts 83 karma points
    Apr 22, 2016 @ 08:32
    Mike Trillwood
    0

    Hi,

    Thanks for the quick reply!

    Sure I'll do my best to explain:

    The Document Types in question are at the top level a News Stories type that inside has a multinode treepicker (which came from the other forums) to put all the article document types under it in the tree.

    The content tree is the same so:

    Website Homepage -> Latest news page -> Contains a list of articles.

    So essentially as above what I'm looking for is a News stories page that contains a list of articles that can be added too (like blog posts) and shown one after the other on the Latest news page.

    I hope this makes sense? Regards Mike

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Apr 22, 2016 @ 08:57
    Steve Morgan
    101

    Hi Mike,

    Do you just want a list which is updated as new news articles are added or do you need the freedom to "pick" which ones are shown?

    If you're new to Umbraco work through the creating a basic site tutorial at https://our.umbraco.org/documentation/Tutorials/Creating-Basic-Site/

    The section in the link below has a very simple example for looping through the "child" nodes and providing an overview list page - exactly what I think you're asking for?! https://our.umbraco.org/documentation/tutorials/creating-basic-site/Articles-Parent-and-Article-Items

    If there are going to be a good number of articles it's usually worth putting in some "subcontainers" (e.g. month and year?) these also help provide nice URLS - e.g. mydomain.com/news/2016/02/some-news-article

    If you need the picker example then it will work in a very similar way to the above and I'm sure we can point you in the right direction.

    So if you can confirm that's what you want and if it's a picker or not then we can help you some more.

    Steve

  • Mike Trillwood 3 posts 83 karma points
    Apr 22, 2016 @ 09:54
    Mike Trillwood
    0

    Hi

    Yes that was exactly what I was looking for an works a treat, I was steering away from partial view macros as sure I read they were being phased out.

    Don't always believe what you read... !!

    Thanks Mike

Please Sign in or register to post replies

Write your reply to:

Draft