Lava Example - 16
Prompt
For this exercise, you have two person records to play with:
Cindy Decker is in a variable called {{ personOne }}, and Ted Decker is in a variable called {{ personTwo }}. That way you can test your template with two people of different genders (instead of only using CurrentPerson).
Our designer has created a template that's supposed to show a message if the person's gender is "Female". But it's not working correctly - can you see why?
Fix the conditional, and then make sure it works properly for both of the people we've provided.
Initial Code
{% assign person = personOne %}
{% if person == 'Female' %}
You're invited to the Grove at Rock Solid Church.
{% endif %}
Solution Lava
{% assign person = personOne %}
{% if person.Gender == 'Female' %}
You're invited to The Grove at Rock Solid Church.
{% elseif person.Gender == 'Male' %}
The women in your life are invited to The Grove at Rock Solid Church.
{% else %}
Welcome to The Grove, the Women's ministry at Rock Solid Church.
{% endif %}