instead of displaying $content completely rendered, I was hoping to break up the cck fields into groups to place in different areas.

I like this idea, but it does not work with D6 : http://jodyhamilton.net/node-theming-field-deconstructing-node-content-d...

I can do just the body like print $node->content["body"]["#value"], and just the images like
if($field_image && !$teaser):

 foreach ($field_image as $img) {
						
						if($img["view"]){
							print $img["data"]["title"] . "<br/>" . $img["view"] . "<br/>" ;
						}	
					
					}

endif;

But what she does in that link is much nicer as far as letting new fields or changed fields still work, and just take a few fields out for manipulation.

Does not work in D6 (fields do not show up in foreach, only body)

unset($node->content['field_dumb_field']);
unset($node->content['field_annoying']);
unset($node->content['#children']);

foreach($node->content as $key => $field) {
    print $field['#value'];   
  } 

So I want to do just hat she is doing. take out an image field and style it, place it in a different div, etc, but let the rest of my fields display as they normally would by using 'display fields' options

thanks!

Comments

vm’s picture

investigate the devel.module which will aid greatly in exporing what is inside the $content variable.

Thilan’s picture

To access only the node body
print $node->content['body']['#value']

To access the custom CCK field with the name "field_page_footer"
print $node->field_page_footer[0]['view']

Hope this helps!!