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
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

prosk - June 26, 2009 - 09:30
Title:$FiELDGROUP_name_rendered available» $FIELDGROUP_name_rendered not available

#2

prosk - June 26, 2009 - 09:32
Title:$FIELDGROUP_name_rendered not available» CCK $FIELDGROUP_name_rendered not available

#3

jcnventura - July 3, 2009 - 11:59
Project:Printer, e-mail 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.

#4

yched - July 3, 2009 - 12:10
Project:Content Construction Kit (CCK)» Printer, e-mail and PDF versions
Version:6.x-2.x-dev» 6.x-1.7
Component:fieldgroup.module» Code
Assigned to:prosk» Anonymous

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

jcnventura - July 3, 2009 - 12:18

@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

jcnventura - July 17, 2009 - 12:31
Status:active» closed

No further info in two weeks. Closing the issue.

 
 

Drupal is a registered trademark of Dries Buytaert.