+1 vote
in Rock by (13.1k points)
edited

Originally posted by Unknown

After upgrading to v. 14 I noticed that all of my badges are not the correct size or look funny. I also noticed some errors occuring at the top of the person profile pages.

1 Answer

+1 vote
by (13.1k points)
edited

Originally posted by Unknown

After upgrading to v. 14 or later you'll need to update the coding for any badge that is a Lava badge on profiles.

Old Code:

{% assign groupHasRequirements = Entity.GroupType.GroupRequirements | Size | AsBoolean %}
{% assign typeHasRequirements = Entity.GroupRequirements | Size | AsBoolean %}

{% if groupHasRequirements or typeHasRequirements -%}
    <div class="badge" data-toggle="tooltip" data-original-title="Group has requirements." style="color:var(--brand-success);">
        <i class="badge-icon fa fa-tasks"></i>
    </div>
{% endif -%}

New code:

  • NOTE: In the new code, after "div" the 'badge' has been updated to 'rockbadge'.
{% assign groupHasRequirements = Entity.GroupType.GroupRequirements | Size | AsBoolean %}
{% assign typeHasRequirements = Entity.GroupRequirements | Size | AsBoolean %}

{% if groupHasRequirements or typeHasRequirements -%}
    <div class="rockbadge rockbadge-icon" data-toggle="tooltip" data-original-title="Group has requirements." style="color:var(--brand-success);">
        <i class="badge-icon fa fa-tasks"></i>
    </div>
{% endif -%}

If you do not add the 'rock' before badge, the badge will appear too big for the badge bar on a person's profiles.

More information about badge coding can be found in Rock documentation here - https://community.rockrms.com/styling/components/badges

Additionally, if there is any lava that has script at the beginning you will see an error on a person's page until that script is removed.

Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...