Active
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2010 at 04:45 UTC
Updated:
15 Nov 2011 at 14:30 UTC
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 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 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).