--- title: "Placeholders with Alternative Content" slug: "alternative-content-personalization-placeholder" description: "Insert one of two text or image variants with a single placeholder in Mapp Engage, based on a condition. Syntax, rules for quotes, and an example." status: "update" updated: 2026-11-04T10:37:38Z published: 2026-11-04T10:37:38Z canonical: "docs.mapp.com/alternative-content-personalization-placeholder" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Placeholders with Alternative Content ## Overview This placeholder inserts one of two text or image variants into a message, depending on whether a recipient meets a condition. During sendout, Mapp Engage checks the recipient's data and inserts the matching variant. You enter this placeholder as code. The graphical Personalization Builder does not support it. For more than two variants, use a personalization rule with `InsertIf` and `InsertElse` blocks. See [Personalization Rules Syntax](/v1/docs/syntax-of-personalization-rules). --- ## Background Information The placeholder needs three pieces of information: - The condition that the recipient's data must meet - The text or image to insert if the condition is met - The text or image to insert if the condition is not met Conditions use the JSP Expression Language. You can also use [Mapp Engage functions](/v1/docs/mapp-engage-functions). --- ## Configuration and Behavior Use this structure: ```plaintext <%${(condition) ? 'variant if true' : 'variant if false'}%> ``` Rules inside the expression: - The expression is wrapped in `${ ... }`. - Fixed text values are written in single quotes, for example `'Welcome back'`. - Attribute references are written without surrounding quotes, for example `message['Name']`. - To check whether an attribute has a value, use `not empty`. To check whether it is missing, use `empty`. ### Example The header shows the saved message name. If no message name exists, it shows the subject instead. ```plaintext <%${(not empty message['Name']) ? message['Name'] : message['Subject']}%> ``` Result: - If `message['Name']` has a value, that value is inserted. - If `message['Name']` is empty, `message['Subject']` is inserted instead.