How to create a "Archive" DocumentType/Content in umbraco
Hi All,
I need to create a webpage that has a listing of some archived pdf documents by year. So basically, the user picks the year from a dropdown and then the page needs to display a bunch of hyperlinks to various pdf documents ( that have been stored in media folder). What is the best approach to handle this?
As I see it you could create a DocumentType called e.g YearFolder, and another one called e.g PdfFile. The YearFolder, has no property it´s only for the structure, and on the PdfFile DocumentType you have a media picker where you can pick a pdf file from the media section.
After that you should be able to make a dropdown that contains all the years, and when the user choose a year then you should output all the children of the year.
Another way could maybe be using the package called AutoFolders http://our.umbraco.org/projects/developer-tools/autofolders This package auto creates folder structures for new pages. The folder structures can be date based (yyyy -> MM -> dd, yy -> MMM, etc) or alpha character based (a-z). I have tested the package myself and depending on whichUmbraco version you are running it could be a options,
If you´re running version 6 or a previous version, and want to try it, I think that you should make a test install on localhost or a development environment to check if the package is working as it should, and no breaking changes.
I don´t know if this is best approach to handle this, but I think that is a possible way to do it.
How to create a "Archive" DocumentType/Content in umbraco
Hi All,
I need to create a webpage that has a listing of some archived pdf documents by year. So basically, the user picks the year from a dropdown and then the page needs to display a bunch of hyperlinks to various pdf documents ( that have been stored in media folder). What is the best approach to handle this?
Thanks
Shilpi
Hi sg.
I will try to come with some ways to do it.
As I see it you could create a DocumentType called e.g YearFolder, and another one called e.g PdfFile. The YearFolder, has no property it´s only for the structure, and on the PdfFile DocumentType you have a media picker where you can pick a pdf file from the media section.
After that you should be able to make a dropdown that contains all the years, and when the user choose a year then you should output all the children of the year.
Another way could maybe be using the package called AutoFolders http://our.umbraco.org/projects/developer-tools/autofolders This package auto creates folder structures for new pages. The folder structures can be date based (yyyy -> MM -> dd, yy -> MMM, etc) or alpha character based (a-z). I have tested the package myself and depending on which Umbraco version you are running it could be a options,
If you´re running version 6 or a previous version, and want to try it, I think that you should make a test install on localhost or a development environment to check if the package is working as it should, and no breaking changes.
I don´t know if this is best approach to handle this, but I think that is a possible way to do it.
Hope this helps,
/Dennis
Hi Dennis,
Thanks for giving me some ideas to start the implementation. I will look into the package and also your suggested method.
Thanks so much
Shilpi
is working on a reply...