Lava Example - 61 | Rock Community

Lava Example - 51


Prompt

We need to see what schools the Deckers attend. Our server stores that information in an attribute with a key of School.

Create a template to display their name and school name.

But for some of our workflows we also need the Raw Value of their schools, so show that in parenthesees too.

Noah Decker's PersonId is 7, and Alex's is 8.

Initial Code
{% assign noah = 7 | PersonById %}
{% assign alex = 8 | PersonById %}
Solution Lava
{% assign noah = 7 | PersonById %}
{% assign alex = 8 | PersonById %}
<p>{{ noah.FullName }}: {{ noah | Attribute:'School' }} ( {{ noah | Attribute:'School','RawValue' }} )</p>
<p>{{ alex.FullName }}: {{ alex | Attribute:'School' }} ( {{ alex | Attribute:'School','RawValue' }} )</p>