I´ve installed the Content profile and than the Simplenews. On My profile, I´ve on the first place my Newsletter subscription and then the profile. How can I change the order? I try to change to Garland, but its the same in it. I try to change the weight on the Content profile type setup, but with no avail. Have I overlooked something?

Comments

dooug’s picture

I looked into this. It seems that the Simplenews is lacking a way to change the weight of it's subscription item on the user's profile page. The template_preprocess_user_profile function sorts the elements in the $account->content but for some reason both the Simplenews and Content_Profile modules set the weights one child below where this is sorted.

A solution for your problem would be to use the $account->content variable in the user-profile.tpl.php. The $account->content['simplenews'] and $account->content['content_profile'] have what you need and you can put them in whatever order you like.

However, I am going to try to investigate further why these modules set weights that aren't used. And I might patch Simplenews to allow to change the weight.

drupalfan2’s picture

function phptemplate_preprocess_user_profile(&$variables) {
  $variables['account']->content['simplenews']['my_newsletters']['#weight'] = 10;
  unset ($variables['account']->content['simplenews']);
  unset ($variables['profile']['simplenews']);
  }
}

Why does none of these lines work? No effect!
Please help me to change weight or to remove from profile page.