Hi,

Perhaps I'm doing something wrong, but I can't figure out how to have print version link for cck or page node types... it seems it does not work.

Am I missing something?

Thanks

CommentFileSizeAuthor
#3 template_for_node.patch1.88 KByas
#2 print_5.patch527 byteswmostrey
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wmostrey’s picture

Version: 4.7.x-1.x-dev » 5.x-1.1
Priority: Normal » Critical

This issue still applies and is critical since CCK gains more and more popularity with it's semi-core status.

wmostrey’s picture

FileSize
527 bytes

This patch displays a printer-friendly page of any content type. The links are not rendered as normally but at least a printer-friendly page is displayed, as opposed to an empty page. Perhaps the module maintainer can continue on this to fix it completely.

yas’s picture

Assigned: Unassigned » yas
Category: bug » feature
Priority: Critical » Normal
Status: Active » Needs review
FileSize
1.88 KB

Hello,

Let me propose a patch which we can specify a template file by HTML for every single node.
The templates can be specified in Printer Friendly settings page: admin/settings/print.

The default template is respectfully a file of 'module/print/print.node.tpl.php' (whose filename is hard-coded, so it also may be better to specify the location such as the filename and path).

In this patch, the template file is just an HTML file, however we can insert each value of a node or a node by cck. For example, if we want to print a value of a node by cck, just put

$node->field_xxxxx[0]['view'];

into your HTML file somewhere.

We will acquire a reporting system like Microsoft Access with this patch for Print module as this way.

--- yas

ryo’s picture

Priority: Normal » Critical

Any new movement?
I think this is a very critical issue.

baronmunchowsen’s picture

Yeah I'd say this is pretty much completely necessary given that CCK and custom content types are used in pretty much in every drupal installation I undertake, and I'm sure many other developers are in the same boat.

jcnventura’s picture

Status: Needs review » Closed (fixed)

The new 5.x release includes a modified version of wmostrey's patch.

The custom template is something that I will try to add when I figure out how to use user-contributed files. I do not want that type of module customization to reside in the module directory.

Please try it out on CCK pages. I don't use it myself so I appreciate the inputs.

emdalton’s picture

Works for us! Thanks!

bmiddlet@drupal.org’s picture

Category: feature » support
Status: Closed (fixed) » Active

The current version works perfectly for the page node but not for the book node. Though I get a printer-friendly link on the book page, it only show the standard book fields (subject and body). The cck fields do not appear. The whole of the printer-friendly page that is rendered on books is not the same nice format as the page node now renders. It reverts back to the "built in" version of printer-friendly that has always appeared with books.

jcnventura’s picture

Assigned: yas » jcnventura
Status: Active » Closed (fixed)

Actually, the 'printer-friendly version' link in the book nodes is implemented by the book module.

I have specifically removed from books the display of this module's printer-friendly link, so the problem that you are reporting should be addressed to the maintainers of the book module (or to core Drupal).

It's my belief that eventually that functionality in the book module should disappear and be assumed by this module, but for that, this module must be able to process books correctly.