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.
Hello,
I have installed print module and it works great.
However,when I click on the 'Print friendly version' link within a paginated views, it shows only the current page's views results.
Ideally, it should show views results of all pages right?
Help awaited.
Thanks.
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedRight, but really not possible.
The module will create a printer-friendly version of what Drupal is showing. If it's showing a pager, the PF version will also have a pager.
You can however, tell the module to show a printer-friendly version of something else. You'll have to manually add the link to a page 'print/somethingelse', and define that 'somethingelse' as the same view without a pager.
Comment #2
supriyarajgopal CreditAttribution: supriyarajgopal commentedOk, so you mean to say that I clone the very same view without pagination and then in the actual view, add a link 'print/clone_view' to show a printer-friendly version of the same view?
I shall try that and update you,thanx! :)
Update: This method works..Thanx @jcnventura! :)
Comment #3
jcnventura CreditAttribution: jcnventura commentedGood to know it works.
Comment #4
ilreports CreditAttribution: ilreports commentedAny idea how to make this work if there are exposed filters in the view?
Comment #5
supriyarajgopal CreditAttribution: supriyarajgopal commentedIf there are exposed filters and if you want the filters to be passed on to the printer friendly version of the view as well, check the 'Remember last selection' option in each of the filter criterion and Save the view.
Comment #6
drenton CreditAttribution: drenton commentedAnother option is to change the views pager in hook_views_pre_build.
Comment #7
ann b CreditAttribution: ann b commented#6 worked for me. Thank you @drenton.
I did set the items per page to 1000 however. We have a view that retrieves 25k+ records if not filtered, and we're afraid a user may accidentally click the Printer Friendly link and cause a maximum execution time exceeded php error.