Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Thanks for this excellent module. I've configured content profile content type and trying to print CCK field values through author-pane.tpl.php but it doesn't seems to work. I'm not sure what I'm doing wrong or whether it supports. This is code I added in my tpl file:
global $user;
$myuid=$user->uid;
$node=content_profile_load(profile, $myuid);
print 'node id:'.$node->nid; //it prints the node id from node object
/* following code doesn't print values from node cck fields */
print $node->field_name[0]['view'];
print $node->content['field_name']['#value'];
Thanks,
Comments
Comment #1
NX CreditAttribution: NX commentedsubscribe
Comment #2
MichelleThis is something in CP and I don't really remember how it works... Moving over there.
Michelle
Comment #3
capellichttp://drupalcontrib.org/api/drupal/contributions--content_profile--cont...
Comment #4
kevinquillen CreditAttribution: kevinquillen commentedI found that content_profile_load does not return the correct data from a node, even when cache is completely empty.
I had to create a workaround:
I thought that specifying reset as TRUE would not use cache or reset the cache.. I know I have drush cc'd a few dozen times and this function still returns data from who knows what. I am also using memcache on top of this and not sure if that plays a part in it, but my stripped down function definitely returns the data that is in the content_profile table(s).