Hi,
First thanks for your greeaaat module. It's the second time I need it and I'm enjoying all progress made since the first time I downloaded it.
However my project is more complex and the theme system of the module show his limit.
Why not add the possibility to have separate .tpl.php file for different node type as drupal core system provide.
With drupal core if you have a content type : "product", you just put node-product.tpl.php in your template directory and it override the node.tpl.php file.
I think the same system for this module could be really great. By just putting node-$content_type-print.tpl.php file in the template directory, you should be able to override the print.node.tpl.php file to be able to specify different printed theme for your different node type.
What do you think about this functionnality ?
thanks,
zmove
Comments
Comment #1
jonathanwinn commentedI was just about to write in and ask for the same thing. It would be terrific if this module could somehow integrate with the excellent contemplate module. You guys seem to know your stuff. Is it possible?
Comment #2
zmove commentedHum, I'm not sure we talk about the same thing.
Drupal don't need Contemplate module to provide the functionnality I mean.
It's include on the phptemplate system, for example :
If you have a node type : Product, in your template directory, if you create a node-product.tpl.php file, this file will be read by drupal instead of node.tpl.php.
You don't need module to do that with drupal 5.
That what I ask for this module, it's the fact to create a node-product-print.tpl.php to override the print friendly tpl.php default file. To put a node-forum-print.tpl.php to override the print friendly for forum node type etc.....
Comment #3
jonathanwinn commentedI may be totally wrong, but I think contemplate provides a GUI for just this. I didn't like how Drupal was outputting a particular content type, so I installed contemplate, which (with some CSS help) lets me edit precisely how the content is displayed on the page. In a printer-friendly format, I wanted it displayed differently (I had columns on the webpage, which I didn't want on the print page, etc.), and therefore had to adjust print.node.tpl.php accordingly. The problem is--this screws up all the other node types in printer-friendly mode, so I have to uncheck the Printer-friendly functionality for them in "Content Types." It seems to me, if Printer-friendly integrated with contemplate, I could adjust the output for one content type without affecting the others. Sorry if this is not your issue. Let me know, and I'll post my own thread.
Comment #4
jcnventuraThis is actually a duplicate of http://drupal.org/node/105003, but since I like the way the request is written here, I will mark the other as duplicate.
The answer there applies. This is top on my TODO list for the next version. So please, have a little patience. :)
Thanks,
Joao
Comment #5
jcnventuraHello all,
I have just finished coding the support for this which is now in the latest dev version (in a couple of days it will be v3.0)..
The module now tries to use the following in order:
1. print.node-type.tpl.php in the theme directory
2. print.node-type.tpl.php in the module directory
3. print.tpl.php in the module directory
4. print.tpl.php in the module directory (supplied by the module)
Please test it and tell me how it goes.. I chose to not use http://drupal.org/project/contemplate because I don't want to create unneeded dependencies.
João
Comment #6
jcnventuraNo further comments received. Marking it closed.
Comment #7
jonathanwinn commentedJust wanted to quickly chime in and say I downloaded ver. 5x-3.0, and it works famously. No need to integrate the contemplate module. I love how I can add a tpl file by node type. Perfect! :-)