I'm trying to call the Author Pane on a D7 profile2 profile.
I tried using the block but figure that doesn't work because the Author Pane is only set to show on two content types: Article and Page. And i'm not sure how to get the block onto the Profile page...?
So I tried adding the following to profile2.tpl.php in my theme:
$account = node_load(arg(1));
print theme('author_pane',
array(
'account' => $account,
'caller' => NULL,
'picture_preset' => 'thumbnail',
'context' => NULL,
'disable_css' => FALSE,
)
);
Which seems to work, although the Author Pane is only pulling the uid and not presenting a user pic, the correct login info or last seen info. which is probably because of the Undefined property error it's throwing (see attached)
I figure I'm almost there, but any advice would be appreciated.
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2013-05-27 at 00.47.50.png | 57.49 KB | olisb |
Comments
Comment #1
Scyther CreditAttribution: Scyther commentedThis don't looks so right?! You should send a user object, not a node object as the account.