I really think the default theme for Content Profile should emulate the theme that the user.module uses. I know user module puts things in definition lists, while CP uses CCK's divs for fields, but we're so close with the current contributed CSS.
My problem is that when I view the profile on the user's page, it looks (apart from the grey borders) like the default user module's profile page. But then when I view the node as content, it doesn't get the stylesheet at all, and doesn't even have a div wrapper that I can start theming from.
I can add an init function to get the stylesheet to always be added to the <head> section, but then it loads on every page
/**
* Implementation of hook_init().
*/
function content_profile_init() {
drupal_add_css(drupal_get_path('module', 'content_profile') .'/content_profile.css');
}
But I can't work out how to theme the content such that it has a <div class="content-profile-display"> wrapper around it. What function stub should I be using and will I interfere with CCK's theming?
Comments
Comment #1
waddles commentedNever mind, after watching Moshe's Theme Developer plugin screencast, it was trivial to copy the
content_profile-display-view.tpl.phptonode-profile.tpl.phpin my theme's directory and add thedrupal_add_cssline mentioned above to that. So much cleaner :)