Active
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 May 2009 at 01:16 UTC
Updated:
22 May 2009 at 01:33 UTC
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
Comment #1
michelleThis 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