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.

CommentFileSizeAuthor
Screen Shot 2013-05-27 at 00.47.50.png57.49 KBolisb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Scyther’s picture

This don't looks so right?! You should send a user object, not a node object as the account.

$account = node_load(arg(1));