Active
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2010 at 08:09 UTC
Updated:
21 Sep 2010 at 08:09 UTC
Hi all!
Need some help, becouse i'm realy stuck on getting comments from content_profile on my users profile pages.
What i do:
In user-profile.tpl.php:
$node = NULL;
$node_profile = $content_profile->get_variables('profile');
if($node_profile)
$node = &$node_profile['node'];
// [ ... ]
// This is the ready-for-print variable for the user profile data
print $user_profile;
// [ ... ]
// Print this wherever you want to show the node_profile content
print node_view($node, FALSE/*teaser*/, TRUE, TRUE);
// [ ... ]
// Put this where you want to show your comment block
if ($node && function_exists('comment_render')){
if( $node->comment)
{
print comment_render($node);
}
}
and that code causes an error:
Fatal error: Call to undefined method stdClass::get_variables() in user-profile.tpl.php on line 132
What i'm doing wrong?