Continuing from #1005290: print.tpl.php in theme folder not detected even after rebuilding theme registry.. I have print.node.tpl.php in my theme directory and it is properly recognized, but not print.node-{type}.tpl.php.

I'm using Panels and Panels Everywhere without page.tpl.php or node.tpl.php. This might be a compatibility issue. Please chime in if you have a plain vanilla Drupal and also have trouble getting your print.node-{type}.tpl.php recognized.

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Is this for 7.x? or 6.x?

koko saha’s picture

Is the node-{type} included in your current theme?

rcrios’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha1

Hi,

I'm also having the same problem. I'm using a fresh install of Drupal 7.4 with Print 7.x-1.0-alpha1.

I have a content type called quality_procedure.

On print module directory (sites/all/modules/print) I created a template called print.node--quality_procedure.tpl.php. It wasn't recognized. Print uses print.tpl.php. I renamed the file to print.node-quality_procedure.tpl.php. It didn't worked as well (I always flushed cache).

Then I moved the files to bartik's theme folder and did the same tests. None worked.

So it seems that in fact, print isn't recognizing print.node-[type].tpl.php, neither print.node--[type].tpl.php

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Active

In reality, I think that most of the node/template suggestions are completely non-functional at the moment.

neek’s picture

Had same issue...
But i just use my brains and did like 7th Drupal wanna ('--')
print--node_type.tpl.php
And thats working!

Info about theming in module desc have to be fixed.

jcnventura’s picture

Well, there's still a LOT more users of the 6.x version... But yes, nice to know it may be working already :)

jcnventura’s picture

Status: Active » Fixed

Indeed, I've tested this and the specific templates are working fine, except for two problems:

1. The template files only work when placed in the theme directory (in the 6.x version they also worked inside the module directory), except for the print.tpl.php file.
2. The little-used (and not really documented) print_node.tpl.php is not working at all.

Note that the correct template filenames are:
a) print.tpl.php
b) print--node--[node_type].tpl.php
c) print--[html|mail|pdf].tpl.php
d) print--[html|mail|pdf]--node--[node_type].tpl.php

Where d overrides c, and so on.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.