0

I have a view with the following displays in a single View on my Drupal 7 website:

  • Page
  • Attachment 1
  • Attachment 2
  • PDF

The Attachment 1 and 2 displays both are set to be shown on the Page display, based on contextual filters and relationships. This is working great, but I'm not sure how to include all fields from the Page as well as the fields from the Attachments when creating the PDF display (using the PDF Views module), since they are all part of the same View. Is it possible to do so?

1 Answer 1

2

I never was able to get the Attachments to show up in the PDF, but here is my workaround:

I was able to get the output that I needed by using the Reference module and the Viewfield module.

  1. Created Content type A and content types B, C, and D. B, C, and D are all associated with Content type A via Reference fields.
  2. Created contextual/relationshipped views for B, C, and D, relating it to the title field of Content Type A.
  3. Created a Viewfield on Content Type A for each of the sub-content types (B, C, and D).
  4. Created a View for Content Type A, contextualized with Content:Title, and added the Viewfields to this new View (using reverse relationships with the node referenced field). I then added a PDF Page view using Views PDF, and that did the trick!

I can provide more detail if needed. Just let me know...

1
  • Thanks for sharing. you can provide snapshot also. so other community members can have better idea.. Commented Dec 27, 2012 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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