Wondering if anyone can help with a problem:

I have created a content type called 'Brochures' and added a 'file' field with a pdf format. I want the user to be able to upload pdf file(s) then select a particular page for the pdf to populate having them display in a block-view on that specific page.

So the user process would be:

-add content
-select 'Brochure' content type
-browse/upload PDF
-select a page for the PDF to populate <-----This is the part that is giving me grey hair. ;)

Hope I am making sense.

Always, Jason


You could use the Entity Reference module to add the "Select a page for the PDF to populate" field (in the "Brochure" content type).

Then, create a View block that filters on "content type = brochure" and which pulls the PDF file field only. Set up a Contextual Filter for the entity reference field (the one that you selected the node/page for the PDF to populate on) and provide a default value of the nid of the page being viewed.

Placing this block in a region should pull related PDFs for pages that have been referenced. Should work!

  • Thank you, thank you, thank you!!! It worked! :) I was using the 'relationship' filter not the contextual filter. (I am very new to Drupal obviously). lol – Jason D'Amico Nov 5 '14 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.