Closed (fixed)
Project:
Printer, email and PDF versions
Version:
7.x-1.0
Component:
Miscellaneous
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2012 at 19:36 UTC
Updated:
25 May 2015 at 10:23 UTC
Jump to comment: Most recent
Comments
Comment #1
tecjam commentedI have the same issue.
I use page templates for nodes:
eg: page--node.tpl.php
I also use a node template for each content type:
eg: node--entry.tpl.php
I have tried copying the print.tpl.php template into my theme directory, renaming it to
print--html--node--entry.tpl.php and all others filenames given in the readme.txt file.
It does not matter what I called it, it just isn't used at all.
My print page only outputs the Logo, Accessabilty Links and a few other lines, then the skeleton defined in the page--node.tpl.php file ... but no node content at all.
I use html comments in these templates, so I can clearly see which template is called, in this case the page--node.tpl.php.
The html.tpl.php file is not used and thus the print view doesn't even start with a html tag.
I had a look into the code:
function print_preprocess_node(&$variables) {}and
function print_preprocess_print(&$variables) {both of which define
$variables['theme_hook_suggestions'], but I can't seem to see what it's doing.When I rename or remove the page--node.tpl.php - it works, but of course that messes up my website as I have these for a reason.
How does one force it to use the print template, please?
Comment #2
saritha.peddapuli commentedHi,
I used "print_insert_link()" function on custom template to display print icon.
print_insert_link(), print_mail_insert_link(), print_pdf_insert_link()
The *_insert_link functions are available to content developers that prefer
to place the printer-friendly link in a custom location. It is advisable to
disable the regular Printer-friendly link so that it is not shown in both
locations.
Calling the function like this:
print_insert_link()
will return the HTML for a link pointing to a Printer-friendly version of
the current page.
It is also possible to specify the link to the page yourself:
print_insert_link("print/42")
will return the HTML pointing to the printer-friendly version of node 42.
Comment #3
jcnventuraJust fixed this in dev.. Please test it.
There was some interference between getting the normal preprocess_page variables and the theme_hook_suggestions which broke the print module templating.
Comment #5
nevosa commentedHaving the same issue here:
updated to 7.x-1.x-dev, and still happens.
I get the skeleton and content is ignored. The template IS being called (can see my printouts) but the content is not printed.
Nevo
Comment #6
nevosa commentedComment #7
jcnventura@nevos: I can't reproduce this.. I get all my content and of course any customisation I put into the template.. Make sure you've flushed all the caches, as the theming layer may be reusing the old preprocess function definition.
If that doesn't fix it, can you please provide a copy of your custom template?
Comment #8
jcnventuraNo further info in two weeks. Closing the issue again.
Comment #9
pichai commented...And Don't forget update (Print) Display fields in your Content types.
Have a nice day
:-)
Comment #10
fdambrosio commentedwe have te same problem.