Hubhus
ToolsAgent loginSubmit a ticket
All articles

Campaigns & Lead Management / Placeholders

How do I show different content based on lead data?

Published 28. sep. 2026, 16.03

TL;DR

Use @if(condition){ content }@endif or @if(condition){ ... }@else{ ... }@endif . Any Hubhus placeholder can be the condition. Operators: == != ~= (contains) >= <= . Combine with || and && - note: || evaluates before && , parentheses not supported.

Personalize emails, SMS, and pages without creating multiple templates. Hubhus's @if/@else logic lets you show or hide content based on any lead field, select value, assigned person, postal code, event data, and more.

4 things to know

  1. Basic show/hide
  2. If / else with comparison
  3. Contains check (~=). @if(%lead_email% ~= @gmail.com){ You are using a Gmail address... }@endif

    ~= is case-insensitive contains check.

  4. Select field value check. @if(@select[select_customer-type,slug] == commercial){ Business pricing applies. }@endif

    Use the field slug (e.g. select_customer-type) not the display label.

Read more

All supported operators

== exact match  |  != not equal  |  ~= contains (case-insensitive)  |  >= <= > < numeric/date comparisons

Logical operators: || (OR) and && (AND). Note: || evaluates before &&. Parentheses are not supported.

@if(%lead_type% == business || %lead_type% == vip){
  Special info block
}@endif

What counts as FALSE (no content shown)

Empty string, 0, false, off, nej, no. Anything else is truthy. A placeholder that hasn't been filled evaluates to empty = false.

Nested conditions and chaining

@if(%lead_postal_code% >= 1000 && %lead_postal_code% <= 2999){
  Copenhagen area message
}@else{
  General message
}@endif

You can chain multiple @if blocks to handle more than two cases. Use the template editor's preview with real leads to verify your logic evaluates correctly.

conditional
content
lead data
Didn't find the answer? Submit a ticket and we'll get back to you as soon as possible.