elsif

Add secondary conditions to an if block that evaluate sequentially when previous tests evaluate to false.

Syntax

{% if condition_a %} ... {% elsif condition_b %} ... {% else %} ... {% endif %}

Example

{% assign plan = "pro" %}{% if plan == "enterprise" %}Full Support{% elsif plan == "pro" %}Priority Support{% else %}Standard Support{% endif %}

Output

Priority Support

The elsif tag introduces an alternate condition within an if block. When the initial condition evaluates to false, Liquid tests each elsif condition in sequence, rendering the first matching branch.

On programmatic SEO landing pages, elsif customizes paragraphs for specific location tiers. For example: {% if row.tier == 'major' %}Premier metro branch with full facilities.{% elsif row.tier == 'suburb' %}Regional service office with mobile dispatch.{% else %}Standard regional coverage.{% endif %}. This ensures each landing page delivers unique contextual copy.

Try this syntax in the editor.