HTML Block Context

To implement our group-specific message, we would first set the HTML block's Context setting to Group.

The HTML block is now aware that it's working with groups. That's step one. Next, we need to tell it how to find the specific group you're working with.

To do that, you'll go to the Page Properties. Under the Advanced Settings you'll find a section for Context Parameters. This is where you'll tell the page the name of the query string parameter that indicates the group. So, in our example, the group is identified in the URL by a parameter of GroupId. So, that's what we'll use as our Group Parameter Name.

Now we can use the HTML block to do all kinds of things. With Group context you have access to data for group types, attributes, and group members.

For instance, let's say you want to show the campus associated with the group. To show that on the HTML block using Lava, use a special "Context" formatting: {{ Context.Group.Campus }}. That will display the group's campus on the page with the group context (in this case, the Group Toolbox). The example pictured below is for a group from the Main Campus. That will automatically change to show the name of a different campus if the group you're looking at is at a different campus.