How the heck do I print out the cck field in my template?
bflora - November 9, 2008 - 02:36
| Project: | Relevant Content |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | nicholasThompson |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
I'm trying everything and nothing's working.
How do I print out one of these cck fields?
For instance: print $node->content['field_name_of_relevant_content_field']['#value'] doesn't print out my cck field. And that would work for any other CCK field.
I really like the idea of this module, but I want complete control over where and how it displays. that means being able to print out the field whereever I want.
What's the proper way to print the contents of one of these fields out? Thanks. This is driving me nuts.

#1
Good question - I'll take a look.
Sorry about the delay in reply. Been silly busy recently.
#2
Don't worry about it. I check back in from time to time. Thanks.
#3
Subscribing
#4
Hello, I managed to find the way to print the cck field on drupal 6 version of this module. I guess you can work it out for 5.x. I used devel module to get to the right path:
<?phpprint $field_name_of_relevant_content_field[#value]['view'];
?>
example:
<?phpprint $field_relevant_content[0]['view'];
?>
I hope it can help :)
By the way, I didn't manage to print it from Views 2 (this CCK field doesn't appear in the Fields listing). Any workaround for this issue? Thanks!