It seems that the $profile variable from the Content Profile module is not available in /modules/advanced_profile/theme/advanced_profile_author-pane.tpl.php for whatever reason. (I'm not sure why). When I print it out from the template, it is blank. To work around this, I created a custom module with a hook pre-process function for author pane as follows:

/**
* Implementation of hook_preprocess_author_pane().
*/
function custom_preprocess_author_pane(&$variables) {

  if (module_exists('content_profile')) {
        $variables['content_profile'] = new content_profile_theme_variables($variables['account']->uid);
  }
}

and then in /modules/advanced_profile/theme/advanced_profile_author-pane.tpl, I access my profile variables by doing the following:

$profile = $content_profile->get_variables('profile');

I'm not sure if there is a better way of doing this, so hoping this will help someone.

Comments

Michelle’s picture

Title: $Profile not available in advanced profile author pane template » $Profile not available ito author pane
Project: Advanced Profile Kit » Content Profile
Version: 6.x-1.0-alpha3 » 6.x-1.x-dev
Component: Code » Miscellaneous
Category: bug » support

This has nothing to do with APK. The integration with Author Pane was done in content profile so possibly something has changed there. I'm never used this integration so maybe fago can clarify. Moving over there.

Michelle