Weights for user-view

pexxi - May 5, 2009 - 10:52
Project:Profile Category Weight
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Category weights are not correctly applied when displaying user-information [user/%uid]. This small piece of code, placed into profile_category_weight.module, may help:

function profile_category_weight_profile_alter(&$data)
{
  $weights = _profile_category_weight_categories();
  foreach ($data->content as $name=>&$category)
  {
    if (isset($weights[$name]))
    {
      $category['#weight']=$weights[$name];
    }
  }
}

#1

hanoii - May 6, 2009 - 20:49
Status:active» fixed

Thanks, tried that and it worked with a few tweaks, also backported to D5.

#2

System Message - May 20, 2009 - 20:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.