Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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'),
Comment | File | Size | Author |
---|---|---|---|
#1 | user_badges.module.patch | 1.3 KB | Sergio965 |
#1 | user_badges.module-dev.patch | 1.71 KB | Sergio965 |
Comments
Comment #1
Sergio965 CreditAttribution: Sergio965 commentedFor 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.
Comment #2
NancyDruPlease do not use tabs in Drupal code. I substituted
form_clean_id(drupal_strtolower($badge->name))
.Committed to 6.x-1.x-dev.