I have a view with the following displays:

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, since they are all part of the same View. Is it possible to do so?

Comments

Category:support» bug

I'd be more than willing to hire someone to add this functionality as a paid project, assuming this functionality is not already available in the module.

Status:Active» Postponed (maintainer needs more info)
Issue tags:+Needs steps to reproduce

Dear fellow Drupal enthusiasts,

I have set this issue to "Postponed (Maintainer needs more information)".

If not already done please add an issue summary and steps how to reproduce the problem.
And please read again, "Making an issue report".

Help about how to do this can be found on IRC and in the user groups.

After there is new information, please re-open the issue by changing the status to active.

--
This issue was edited with the help of Issue Helper

I'm looking how to do this as well, I can tell you how to reproduce this.

Say you have two content types. One called "jobs" and one called "news". On your page you only want to show the most recent 10 job postings and the most recent 10 news postings. You could try to do this with grouping, but I've never had much luck with it rendering correctly. If you have anything more advanced, like contextual filters or an different design that needs to be applied to each of the different sections it becomes impossible to do in one view.

So what you do is you create a default page view with whatever content type you want to include first. Say for example we create a page view with just the 10 most recent "news" content type postings. Then to get our "jobs" view on the same page, we add an attachment view (+Add->Attachment) and you include your most recent jobs type postings. Then you attach it to your existing page display that has your "news" content types. That way you get two separate sections for two different content types all on one page, neatly and easily formatted.

What the above user here is saying, is that your attached "jobs" content type attachment will not display in the PDF view, it will only show the one content type it's attached to (in this case your default page "news"). There also doesn't seem to be anyway options to inherit the default display attachments.

So to recreate:

  1. Make a views page with one content type. Limit to 10 or whatever.
  2. Add a attachment of a different content type. Limit to 10, and attach it to your first display in the "after" position.
  3. Make your PDF display and also attach it to your primary display page.
  4. Test the output and no attachment display will render.

-----

I'm going to poke around with the views hooks and see if there's a way I can attach the display attachments before it's sent over to Views_PDF. However, I feel like this is one of those things goes over my programming level.

I hope this clears the issue up.

Ok, I feel like a bit of an idiot here, I just realized there was an easy way to this using the additional views include module bundled with this module.

So the steps to solve this are pretty easy. Create your PDFpage view, then simply add the attachments via the header or footer area by using " Global: View area". It even includes a "Inherit contextual filters" option.

The formatting on my end is a bit messy, but that's probably just some cleanup work on my end.

Anyway, sorry for the confusion, next time I'll be sure to read the documentation closer :-).

Wait, it looks to me like the Views Include module allows you to add another, separate view as a field. This seems to be a separate feature as using a view as a header.

But a header is best kept static for positioning purposes so I imagine it's better to use the view as a field rather than prepending it as a header, as a view is not static content.

In this regard, is there a way to use Views Include to add a separate display of the same view, or is the feature limited to totally separate views?

Is there a way for sending of PDF attachment generated by views pdf via email?
Please help, thanks.