By nick.thorley on
I am using the print, pdf and email module to provide a quick method of printing the pages of the site. This works well for nodes which use the base template but if I use it on pages which are using a custom template file then it stops working and just prints a menu. Has anyone had this issue - I presume its just a missing parameter in the template file. Please could anyone advise
Thanks
Nick
Comments
I assume that you are using
I assume that you are using the module http://drupal.org/project/print .
Depends on what you did in your template and how you are rendering your fields.
Under your content type's Manage Display, you can setup a "Custom Display Setting" for Print.
Otherwise you might need to override the print.tpl.php for your specfic type. As mentioned on the project page, the naming format is:
print[--html|--mail|--pdf][--node--node-type].tpl.php
Thanks
Yes that's the module I am using.
I haven't been into that setting on the data type so will look at that when I am back at my machine but I am unsure if it will be that as when I remove my data type .tpl.php file and hence use page.tpl it works fine - does the setting you ate talking about only work on custom .tpl files?
In terms of the custom .tpl file - I have just taken the default template and removed the $content and output individual fields instead. Is there a field which is key to print working properly or maybe a class which must be added to a container. I am getting an output but it's of one of the menus rather than the content
The "Manage Display" area is
The "Manage Display" area is a way to format custom fields without modifying custom .tpl files.
Obviously, you are not using that. Since you removed "$content", you are no longer using the default rendering. That explains the issue with print. I think you can easily resolve this by copying your node--type.tpl.php to print--node--type.tpl.php.
Thanks
I will try that - I have a custom node template and also a custom page template - hence I assume it's just the node that I need to create a print template for and not the page also?
Thanks
Nick
Print--node--contenttype.tpl.php
I have setup the print template file and now on trying to print I get no output at all - just a blank page.
correct structure
I get the correct structure of a node output it divs etc but there is no data within it?
Would it be worth me uploading my template file?
Nick
Open a module specific issue
I suggest opening an issue in the http://drupal.org/project/print issue queue. The developers will know more specifically how to handle this issue.