Campaigns & Lead Management / Placeholders
How do I show different content based on lead data?
Published 28. sep. 2026, 16.03
TL;DR
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
- Basic show/hide
- If / else with comparison
- Contains check (~=). @if(
%lead_email%~= @gmail.com){ You are using a Gmail address... }@endif~=is case-insensitive contains check. - 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.