Unable to style the user badges view on the user page individually as no class has been assigned.

Adding the following code to the $account->content['user_badges'] array will fix this.
'#attributes' => array('class' => 'user-badges'),

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sergio965’s picture

Assigned: Unassigned » Sergio965
Status: Active » Needs review
FileSize
1.71 KB
1.3 KB

For 6.x-1.5: Patch adds classes to the overall presentation of the badges (classes of 'user-badges' and 'badges') as well as the individual image in the form of 'badge badge-name'.

For 6.x-1.x-dev: Couldn't get the module to successfully install without errors, but the supplied patch should theoretically work.

NancyDru’s picture

Status: Needs review » Fixed

Please do not use tabs in Drupal code. I substituted form_clean_id(drupal_strtolower($badge->name)).

Committed to 6.x-1.x-dev.

Status: Fixed » Closed (fixed)

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