I hope the title is a bit clear but this waht I need/want: At the moment users that have the right to make content can add a PDF for certain content types, this is added as an attachment so users have to go to the content first and then have to click on the PDF to see it. Is it possible to let my users add only a PDf to a content type and that the content type IS a pdf only? So when someone goes to that page and clicks the link the PDF is immediately shown instead of a page in between with an attachment. So this makes it 1 click to see the PDF and not 2.
1 Answer
This doesn't exactly answer your question (since maybe there is a module for that, but not that I'm aware), but here is what I do.
I have a content type for documents with two fields: summary/abstract and then a file upload field that accepts PDFs. If a PDF has a summary or abstract, I put the summary/abstract in that field and just link to the content's page figuring that the user can read that and then click on the document if they want. Otherwise, I still use this document content type to upload the file, leave the summary blank, and then link directly to the uploaded file itself. It would still have its own page created by the content type, but a site user isn't going to see that.
drupal_goto()
and the filename associated with that field.