CCK $FIELDGROUP_name_rendered not available
prosk - June 26, 2009 - 09:20
| Project: | Printer, e-mail and PDF versions |
| Version: | 6.x-1.7 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
It could be great to add code to get the $GROUP_NAME_rendered variables available in the print.tpl.php (added to node by cck fieldgroup). Currently, only the $field_name variable are available.
How do you explain that?
I don't know where to add template code, maybe in the _print_generate_node function?
Thanks for your help.

#1
#2
#3
All the fields in $node are filled that way by Drupal and the other modules. I'm not removing any of them (except for pagination).
I am moving this to the CCK queue as they may be able to answer why that field is not available in the $node variable after a drupal_render() call.
#4
The $FIELD_NAME_rendered and $GROUP_NAME_rendered (that contain the rendered HTML for a specific field or group), are added by
cck's implementations of hook_preprocess_node() : content_preprocess_node(), fieldgroup_preprocess_node() - thus it only affect node.tpl.php templates.
It's up to Print module to make those variables available in it's own print.tpl.php templates - possibly using the same code than CCK's ?
#5
@yched: Thanks for the fast answer.
@prosk: In the extreme doing all of this would re-create all of Drupal inside the print module. In this case I draw the line here.. The print module is supposed to make a simpler rendering of the Drupal page. Grabbing some vars from the CCK modules in a pre-process hook is way outside that purpose.
If someone makes a patch, I will consider including it, but I don't have a reason do implement it for such a specific need.
João
#6
No further info in two weeks. Closing the issue.