This project is read-only.

Best Way To Enable List of PDFs Scenario

Topics: General
Apr 25, 2011 at 5:42 PM

What's the best way in Orchard 1.1 to provide support for a user to be able to add a PDF and a name and for these to appear on the site?  I'm initially thinking that I want this to be a List of Newsletter Content-Type items, and somehow each of these content items will include simply a name (e.g. "March 2011 Newsletter") and allow a file to be uploaded (the PDF).  Any tips on how this should be done?

Apr 25, 2011 at 6:16 PM
Edited Apr 25, 2011 at 6:18 PM

You could do this pretty easily by creating a custom field for "link URL".

However if you want a system where you can upload files and automatically generate content items from it (which sounds more like what you're asking) see my response to the following discussion:

The basic gist is, Media Garden ( already has rudimentary support for this kind of "file as content" story and will soon make this type of scenario even easier. At the moment you could pull in an upload folder as "Binary" content items and edit their titles. You could actually write your own filters to support the PDF format and then it could automatically create your custom "Newsletter" content item from uploaded pdfs; this itself would be really easy and only require implementing a couple of interfaces. I've actually suggested elsewhere that handling pdf / doc files would be a good extension for the system. See existing image/audio/video modules for examples of how the content types are set up and the formats and filters implemented.

Some additional features I'm adding (hopefully in the next couple of days) will make it even better; for instance when you've uploaded a batch of content you'll be able to fill out all the titles on one screen, and it'll support automatically building lists of items as you import them. At the moment you'd need to use ContainablePart on the media content type and add them to lists manually.

Documentation isn't 100% there but if you need any immediate help contact me thru codeplex :)