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?
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.
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.
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
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
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
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
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
is working on a reply...