I'm setting up a news section for a site, where I want the news articles to be grouped by year, with a latest news page that lists the latest news articles.
Example structure:
News (list most recent articles, say latest 10)
-- -- 2009
-- -- -- News Article 1
-- -- -- News Article 2
-- -- 2008
-- -- -- News Article 1
-- -- Other, non-news pages for contacts etc
etc
Assuming that I have a newslist datatype, and a news article datatype, would I be best off having the years as newslist datatypes, with news articles underneath, and then have the latest news articles as a page with a macro that looks for all news articles underneath it (if so, any pointers on the xslt syntax would be appreciated)?
I have not really tried the autofolder myself yet but it looks very promising and customisable, so you can basically make it do anything you would like.
I have used the datefolder package a few times and it gives you a folder structure, which is almost identical to the one you have sketched above.
If you use it you will get your articles sorted by year, month, day article like
You get all your news items organized down to the detail and you can easily pull out the nodes you want.
All you need to do is specify under, which document types you want to add datefolders and they will be automatically created when you right click on your root document type and create a new document based on your news document type.
Btw - Be carefull not confusing datatypes with document types - There's a big difference on those two. I think you have document types in mind, right? :)
I've had a look at the datefolder package, do you know if it's possible to only group by year? This particular site only has a dozen or so news articles a year, so grouping by month and day would be overkill in this case. Also, we'd want the year url's to list all the articles underneath them, would it be able to do that as well?
And yes, I meant document types, not data types, you can tell I'm new to Umbraco!
With DateFolder you can only group by yyyy/MM/dd. However with AutoFolders you can completely configure the format, but I think it does require a month folder. If you're only producing 12 articles a year to you really need auto creation of folders?
"we'd want the year url's to list all the articles underneath them"
I would create the primary and month pages are NewsList doctypes. This would allow the year pages to list the articles within them.
News Section
Hi,
I'm setting up a news section for a site, where I want the news articles to be grouped by year, with a latest news page that lists the latest news articles.
Example structure:
News (list most recent articles, say latest 10)
-- -- 2009
-- -- -- News Article 1
-- -- -- News Article 2
-- -- 2008
-- -- -- News Article 1
-- -- Other, non-news pages for contacts etc
etc
Assuming that I have a newslist datatype, and a news article datatype, would I be best off having the years as newslist datatypes, with news articles underneath, and then have the latest news articles as a page with a macro that looks for all news articles underneath it (if so, any pointers on the xslt syntax would be appreciated)?
Or is there a better way of doing this?
Hi TIm
I would recommend that you take a look at either the autofolder package http://our.umbraco.org/projects/autofolders or the http://our.umbraco.org/projects/datefolder.
I have not really tried the autofolder myself yet but it looks very promising and customisable, so you can basically make it do anything you would like.
I have used the datefolder package a few times and it gives you a folder structure, which is almost identical to the one you have sketched above.
If you use it you will get your articles sorted by year, month, day article like
- 2009
-- 11
--- 11
---- News article 1
---- News article 2
---- Etc.
You get all your news items organized down to the detail and you can easily pull out the nodes you want.
All you need to do is specify under, which document types you want to add datefolders and they will be automatically created when you right click on your root document type and create a new document based on your news document type.
Btw - Be carefull not confusing datatypes with document types - There's a big difference on those two. I think you have document types in mind, right? :)
Hope this helps
/Jan
Hi Jan,
Thanks for the reply!
:)
I've had a look at the datefolder package, do you know if it's possible to only group by year? This particular site only has a dozen or so news articles a year, so grouping by month and day would be overkill in this case. Also, we'd want the year url's to list all the articles underneath them, would it be able to do that as well?
And yes, I meant document types, not data types, you can tell I'm new to Umbraco!
:P
Hi Tim.,
have a look at this link
http://www.dotnetmafia.com/blogs/kevin/archive/2008/02/13/umbraco-action-handlers-101.aspx
hope this helps you
"possible to only group by year?"
With DateFolder you can only group by yyyy/MM/dd. However with AutoFolders you can completely configure the format, but I think it does require a month folder. If you're only producing 12 articles a year to you really need auto creation of folders?
"we'd want the year url's to list all the articles underneath them"
I would create the primary and month pages are NewsList doctypes. This would allow the year pages to list the articles within them.
Cheers,
Chris
is working on a reply...