By bdawg8569 on
Hi all,
I am trying to customize the way my user profiles look on my site. Right now there doesn't seem to be any order to it. I see many articles and snippets that talk about how to do it in drupal 5, but perhaps its different in 6 as it hasn't worked for me. So far i have tried to put this in the template.php file.
function phptemplate_user_profile($user, $fields = array()) {
// Pass to phptemplate, including translating the parameters to an associative array. The element names are the names that the variables
// will be assigned within your template.
/* potential need for other code to extract field info */
return _phptemplate_callback('user_profile', array('user' => $user, 'fields' => $fields));
Then i created a user_profile.tpl.php file to style the page. This page looks like...
print $user->name City:
print $user->profile_City Country:
print $user->profile_Country Postcode:
print $user->profile_ZipCode But the default theme is still being displayed instead w/ all the fields. Any ideas? Thanks.
brian
Comments
Its changed for Drupal 6
Now there are separate theme files for a lot of these pages that you used to have to override, so you don't have to add anything to template.php, just copy the file from its original home and then change it.
http://drupal.org/node/190815