Closed (fixed)
Project:
Panels
Version:
6.x-3.x-dev
Component:
Panel pages
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2009 at 07:32 UTC
Updated:
14 Jun 2013 at 16:48 UTC
1. This issue http://drupal.org/node/194783 clarifies that Panel Pages are not nodes.
2. The Print module expects an NID to process to PDF (link = printpdf/nid)
3. I have a beautiful and very functional Panel Page set up (thanks Merlin and crew...fantastic extension for Drupal!), and now have come to face the problem that my users cannot simply hit a "print ot PDF" link and get their page sent to a file.
Any ideas/workarounds?
Comments
Comment #1
merlinofchaos commentedPanels doesn't support any PDF stuff and probably won't on its own. It would take another module to do this, and I'm not sure that anyone has put any effort into doing this. In short this may not be plausible without some development work from somebody.
Comment #2
boabjohn commentedThanks M'C...
I am not sure that the PDF issue is the central focus. I think it's really more about how to provide a portable container for a Panel page.
The Print module will accept a custom template, but again, this depends on being able to address a particular "container" and the elements inside it.
The PDF example calls up a set of specifics. Here's what can be done now, I think:
1. We can look at the Panel page and see all the content elements on it...views, nodes, blocks, etc...
2. Then we open up a new tpl and hand-build a reference for each element
3. Then call this template when the user clicks on "Print to PDF" from the nice panels page.
Of course this is:
a: tedious
b: creates a content/presentation "fork" between what we build/maintain through the Panel interface vs the tpl elements
That appears to be "just the way it is...", but I appreciate you having a think and confirming that's the case from your high-level architect's perspective.
Thanks.
Comment #3
esmerel commentedComment #4
merlinofchaos commentedCan you tell me more about what is meant with a portable container? Is this an HTML construct that is well-identified or is this a code thing where you can get the content of a panel page easily from a function call?
Comment #5
boabjohn commentedG'Day and thanks for the clarifying comment...
You will have a far deeper view of these matters than I, but "portable container" is my own abbreviation for a way to pass a panel assemblage to another rendering agent. And, aside from sending it to a printer (webkit HTML to PDF in this case), I can't think of another situation where this capability might be useful.
You'll appreciate the inelegance of a fork in the content that occurs because I happen to need my panel page rendered in a PDF. The content of the panel page is painstakingly replicated in a static print template. Any change to the panel page content means a round of manually mirrored changes to the pdf template.
I've solved my immediate problems and accept that the world is still a hard place...
Thanks heaps for your work and magnificent modules.
Comment #6
merlinofchaos commentedI admit I'm still struggling to make sense of what you need. You use a lot of words that don't really match the terms I use for parts of a panel, so I don't understand how they map to the code or the constructs in your mind.
Let me break this down for you:
When you say assemblage, I don't know if what you want is the full set of panes in their regions prior to the layout being rendered for the display, or if you just want the whole thing packaged up and sent to a different template than page.tpl.php.
Comment #7
merlinofchaos commentedComment #8
roginald commentednot sure if this is appropriate but the print module will work if you just prepend 'print' before the url alias of your panel page. i've tested both 'print' and 'printpdf' for generating a pdf from a panels page and both work fine. of course, the css needs tweaking, but it wouldn't be too much to make something work i don't think.
Comment #9
boabjohn commentedThanks for all the feedback: I've coded a pdf template to 'solve' the problem. Closing ticket.
Comment #10
bjmiller121 commentedPrepending the URL with "print" or "printpdf" seems to work for me as well, but an even simpler solution is to go to the Printer, e-mail and PDF versions configurations page (admin/settings/print) and in the box labeled "Show link in system (non-content) pages", just put in the url alias for any page including any panels page that you want a print link on. You can do this for each each print type you want to include (printer friendly webpage, PDF, send to friend).
Comment #11
smiletrl commentedhi, boabjohn,
Could you give me some hints about how to make the pdf tpl recognized by its pdf url?
Saying, there's a panel page about-us, and it's print url could be print/about-us. This page has a default page. I guess that is from print.tpl.php too. Now I want to override that page with a pdf tpl. So, what's name this tpl, should be?
Thank you very much.
Comment #12
smiletrl commentedHi ,roginald,
Currently, I want to print some panel pages and views pages into pdf. I know default print url looks like this "print/". But how can we override that page with a print pdf template? Or more specificly, what's name we should assign to pdf tpl, so this tpl will be used for that panel print page? I know the naming convention for node page is kind of like this "print__node__{$type}__{$nid}".
When you were saying "css needs tweaking", could it be tweaking the default print page? I checked the default print page for a panel page. I think it uses the default print.tpl template from print module to create this page.
Any help will be appreciated. Thank you.
Comment #13
liquidcms commentedwe couldn't get printpdf/mypanelpage to create a pdf. once we unchecked "Disable Drupal blocks/regions" for the panel; it worked fine.