Core Docs - Digital Publishing - Use Merge Fields
Rock Version: v20.0
Last Modified: 2026-05-01 1:28 PM
It's time to change the paradigm of how you write content. With Rock, content doesn't have to be impersonal any longer. Using merge fields, you can customize the content for the logged-in person. Not only can you add their name, but you can look at all of the person attributes and make the content relevant to their relationship with your organization. Let's revisit the example from the introduction.
Adding the following on a baptism page allows for personal and actionable content:
{% if Person %}
{% if Person.BaptismDate != '' %}
{{ Person.NickName }}, remember the joy of your baptism? Share that joy
with a friend who hasn't yet taken the plunge at one of our upcoming
baptism events!
{% else %}
{{ Person.NickName }}, now is the time! Don't put off baptism any longer,
take the plunge at one of our upcoming events!
{% endif %}
{% else %}
Take the plunge at one of our upcoming baptism events!
{% endif %}
Note the use of Lava syntax to add logic to the page. Here's how the markup above would look:
Besides information on the current person, you also have access to all organization attributes and items in the context of the page. For more information on Lava syntax see the Lava Basics.