2 Accessing group information with Liquid for person profile badges 10 Michael Garrison posted 10 Years Ago I'm sure there's a way to do what I want to with the person profile badges, but I've hit a wall with trying to pick my way through the Liquid attributes. Here's the short version: we have five classes that we offer (membership, growing, etc) and we'd like to show a badge on each profile indicating whether they've completed the class. So I set up a group type of "Class Container", whose sub-groups are of type "Classes", with purpose "Class". The "Classes" groups have Roles of "Expressed Interest", "Signed up", and "Graduate", as well as a Member Attribute of "Class Date". Then I created a container group, and five child groups within it - one for each class. So far, so good. Now, there's no badge of type "In specific group" (may I suggest an addition?), so the only option besides using Liquid appeared to be to change the setup and have a different group TYPE for each class so I could use the "In group of type" badge type. That seems awfully clunky- if we wanted to change roles for instance, we'd have to do it five times. And since ideally I'd like to color the icon based on which of the three roles the person "held" in the class, I started looking at the Liquid badge type. I managed to find Person.Members and iterate the groups they were members of, and establish that the first of the five classes is group with Id of 68 (and with that, the GUID of the group). In this case, Liquid reported [Id, 68][Guid, d345226f-2cf4-4a6a-893b-512b9ad721df][Classdate, 3/22/2014 (3days)][Classdate_unformatted, 3/22/2014] But I couldn't seem to use that Id in the Liquid conditional statement to have the icon render properly. Copying built-in badges like Baptism, I tried {% if Person.Members.Id[68] != empty -%} <div class="badge"> <i class="badge-icon fa fa-road" style="color:blue"></i> </div> {% else -%} <div class="badge"> <i class="badge-icon badge-disabled fa fa-road"></i> </div> {% endif -%} and then tried other conditionals like Person.Members.68, Person.Members.Id.68 and other combinations I could come up with. I also can't find out whether Liquid has access to the "Roles" a person might hold within the group. Can anyone help me out with the syntax I need to be using, or do I just need to be patient and wait for the Liquid frameword documentation within Rock to be completed? Thanks
Ken Roach 10 years ago Michael, I'm trying to copy what you've done. Where/how do I add the additional badge icons?