Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi and thanks for you amazing module!
I am using Display Suite to render a content type page. With display suite I render the View Block and the print button.
This works fine on any other node but in the ones that contain Views in them.
Once I click Print, it generates the page in a new window (as per my setting) and shows the title and footer but not the View Block. I have set the "Show link in system (non-content) pages " to the right page but it still wont generate the view in the print page.
Further help would be appreciated!
Thanks!
Comments
Comment #1
maractive CreditAttribution: maractive commentedI have exactly the same problem, did you solve this?
Comment #2
Shevchuk CreditAttribution: Shevchuk commentedSame problem with Views Block attached to the page. Tried
as proposed in FAQ, and this worked ok in 7.x-1.2, but not 7.x-2.x
Comment #3
Shevchuk CreditAttribution: Shevchuk commentedComment #4
GinaF CreditAttribution: GinaF commentedI was using
in the print.tpl page to print any blocks on a page that contained content from a view.
This was working for both views that require the nid plus views that didn't. Since upgrading to 7.x-2.0, any views requiring the nid are not showing at all. I have also just upgraded views to 7.x-3.8 as well.
Any help much appreciated - I am stumped.
Comment #5
codenamerhubarb CreditAttribution: codenamerhubarb commentedAre you using contextual filters? I was having this issue and was able to fix it...
In the CONTEXTUAL FILTERS of my block views I am getting the Content: Nid.
Originally I had the settings for this to "Content ID from URL". For some reason this wasn't playing nicely when on the print pages (/print/[node id]).
I just changed the settings for Content: Nid to "Raw value from URL", Path component: 2 and it is working.
Comment #6
GinaF CreditAttribution: GinaF commentedI tried codenamerhubarb's suggestion, but this didn't work for me.
Thanks anyway.
Comment #7
GoempieK CreditAttribution: GoempieK commentedDid you ever get this resolved?
I am having the same problem
Comment #8
aytee CreditAttribution: aytee commentedHere's what I did to address this issue:
- Like the OP, I have Display Suite and a custom Block field displaying a View as a Field on my Content Type. The view block does not show up using the PDFPrint or Print function.
- In the print.tpl.php file, I've added the View block explicitly within the template
The third argument above ($node->nid) is the contextual filter. The Contextual filter for the View is "Content:Nid". For the Contextual Filter settings: "When the filter value is not available" - Provide default value - "Content ID from URL" (in the select menu).
These settings now allow for the View Block to show in both the Print and PDF outputs.
Comment #9
estebant CreditAttribution: estebant commentedHi! This is my solution:
1. Go to Display Suite -> Fields
2. Add a block field
3. In Block, select "Printer, email and PDF versions"
4. Now you can place that field in your display
If still not showing, check:
Configuration -> User interface -> Printer, email and PDF versions
and make sure that in Link options, you have "Block" checked
I hope it helps, cheers!