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.

Comments

prosk’s picture

Title: $FiELDGROUP_name_rendered available » $FIELDGROUP_name_rendered not available
prosk’s picture

Title: $FIELDGROUP_name_rendered not available » CCK $FIELDGROUP_name_rendered not available
jcnventura’s picture

Project: Printer, email and PDF versions » Content Construction Kit (CCK)
Version: 6.x-1.7 » 6.x-2.x-dev
Component: Code » fieldgroup.module

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.

yched’s picture

Project: Content Construction Kit (CCK) » Printer, email and PDF versions
Version: 6.x-2.x-dev » 6.x-1.7
Component: fieldgroup.module » Code
Assigned: prosk » Unassigned

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 ?

jcnventura’s picture

@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

jcnventura’s picture

Status: Active » Closed (fixed)

No further info in two weeks. Closing the issue.