function linkedin_profile_theme in LinkedIn Integration 7
Same name and namespace in other branches
- 6 linkedin_profile/linkedin_profile.module \linkedin_profile_theme()
@todo Please document this function.
See also
File
- linkedin_profile/
linkedin_profile.module, line 197
Code
function linkedin_profile_theme($existing, $type, $theme, $path) {
$return = array();
//Define the main template file for users profile
$return['linkedin_profile_user_page'] = array(
'variables' => array(
'profile' => NULL,
),
'template' => 'linkedin-user-page',
);
//Deal with multi-structured fields
$multiples = array(
'positions' => 'position',
'educations' => 'education',
);
foreach ($multiples as $key => $val) {
//Template files for multi-values structured fields
$return['linkedin_profile_user_page_' . $key] = array(
'variables' => array(
$key => NULL,
),
'template' => 'linkedin-user-page-' . $key,
);
//Template file for multi-values structured fields items
$return['linkedin_profile_user_page_' . $val . '_item'] = array(
'variables' => array(
$val => NULL,
),
'template' => 'linkedin-user-page-' . $val . '-item',
);
}
//Let themers hook into other profile items
$return['linkedin_profile_user_page_item'] = array(
'variables' => array(
'item' => NULL,
),
'file' => 'linkedin_profile.theme.inc',
);
return $return;
}