Rock U - People - Custom Badges

Transcribed Video Content

So we've already seen the use of badges within Rock. Let's now look at how we can create our own badges and how these badges work behind the scenes. So to administrate badges, we'd go into admin tools, general settings, and then person profile badges. And that'll show you all the ones that are currently created within the system. So let's go ahead and and flip over there and take a look at what we have. General settings, person profile badges. Okay. So here are all all the badges that have been created. Now, let's first start by looking at the type. Okay. So there's not there's there's only a couple different types that come out of the box. You can if you have some programming skills, can actually, develop your own. But I think you'll see that with this one type, Lava, you can basically do almost anything that you'd want. So there's some very simple ones. Some of them are, very simple but specific to a use case which disc. So that's just gonna show you the disc profile. Probably doesn't make sense to have more than one of those. Same thing with campus. Okay? It's just pretty much hard coded just to report to campus. Last visit on-site is very similar to that, so it's it's only for that one purpose. And some of these attendance ones are also kind of the same. Now, some of the reusable ones are though are this in group of type. Okay. So let's take a look at this one. So as you think about your group type structure, you might be considering which ones you might want to create a badge in. Now, you could drop down and use the Lava badge, but in a lot of cases, you can do it a lot easier if you just, use this in group of type badge. So just give it a name, definitely a description. Spell out, , what this badge is for and any kind of special requirements, for that. And then basically, what you do is you just give it a color and tell it what group type to look at. Now, the badge is gonna go look at the group type, and see what icon it has configured for it and it's gonna use that icon for the badge and just color it with this color. So pretty simple, great way to get, , quick easy badges onto your badge bar. But if you really wanna go the extra mile and you wanna do something custom, then you're really gonna wanna look at these lava badges. Okay? So let's go ahead and look at the baptism one. So you pick the group, the badge type of, lava badge and then really the the setting is the lava template. Okay? So your lava will be passed in, this person. Okay. So that's gonna be the, variable that we pass which person that you're currently looking at. And then from there, it's kind of up to you on what to do. So this is a very simple one. All we're all we're doing is we're grabbing a baptism date, attribute for for the person and then just doing a quick if, if that baptism date is not blank, then we're gonna assume that they are baptized because we have a date for them. And this, we're just gonna write out some quick HTML markup. And otherwise, we're gonna say, hey, they're they're probably not baptized. Now, this might feel a little overwhelming until you learn Lava, but what I would suggest is that you just copy and paste this baptism one and just play with it. Okay? So you can play with this, put it on the person profile page and just start tweaking it. And a lot of times what you'll do and you'll find is that it's actually a lot easier than you think. And so if you if you consider the baptism badge, if you remember back to it, it's just a drop. It looks a drop of water. And it's actually the fun awesome icon of FA tint. So again, if you just change this attribute and then change this icon, you're probably way more than halfway there. And the rest of it is actually pretty simple. So if you want the roll the rollover to have some text on it, you just update this data original title and just kind of put your text in there. It's actually pretty simple. Okay. So that's, creating a custom badge using Lava. And, , again, if we just look at the baptism badge as your guide. And, , if the baptism badge doesn't quite do what you want, there's a couple other lava badges in there that you can go and look at their lava and copy and paste. A good part of programming is just copying and pasting from other code. And just to kind of simplify it here is that lava. And what I've done here is I just turned red everything that was basically a lava, a piece of lava. The rest is just HTML. So as you can see, there's really not that much lava, to do, that badge. So that's badges within Rock.