How do I show different content based on lead data?
You can check any placeholder — lead fields, select fields, event data, brand data, assigned person, etc.
On this page
Jump to any section using the links below
Hubhus emails support dynamic, conditional content using @if / @else logic.
With this, you can show or hide content depending on lead fields, select values, assigned-person data, or event information.
This lets you personalize messaging without creating multiple templates.
1. Basic @if logic (Hubhus-correct syntax)
Table of Contents
- 1. Basic @if logic (Hubhus-correct syntax)
- 2. Using @if / @else
- 3. Nested conditions
- 4. Comparisons (==, !=, ~=, >=, <=, >, <)
- 5. Contains operator (~=)
- 6. Logical operators (&& and ||)
- 7. Using placeholders inside conditions
- 8. Using conditional HTML components
- 9. Use the Editor to find placeholders and test logic
The format is:
Example:
What counts as FALSE?
These non-empty values still evaluate to FALSE:
0falseoffnejnon
Everything else counts as TRUE.
2. Using @if / @else
3. Nested conditions
You can add additional checks inside the first block:
4. Comparisons (==, !=, ~=, >=, <=, >, <)
Examples:
Number comparison
Date comparison
Text comparison (literal text)
5. Contains operator (~=)
Checks if a value contains a string (case insensitive):
6. Logical operators (&& and ||)
OR logic:
AND logic:
Important: Brackets not supported
Hubhus evaluates || before &&.
If you need grouped logic, split into multiple @if blocks.
7. Using placeholders inside conditions
You can check any placeholder — lead fields, select fields, event data, brand data, assigned person, etc.
Examples:
Check select-field slug
Check for missing data
8. Using conditional HTML components
You can wrap entire HTML blocks inside @if statements.
Example:
9. Use the Editor to find placeholders and test logic
Anywhere you can edit content:
Press:
CTRL + K on Windows
CMD + K on Mac
This opens the Placeholder Search Modal, where you can quickly find:
Lead fields
Event placeholders
HTML components (buttons, signatures, cards, etc.)
Page links
Booking forms
Brand placeholders
Assigned-person placeholders
You can search using natural words like:
“address”, “event date”, “signature”, “company”, “assigned person”.
The editor also contains full code reference examples:
Variables
For loops
JSON examples
File examples
Calendar event examples
Relations examples
Checklist examples
Use these to test logic before sending real emails.
? Common searches
lead management • lead tracking • customer management
? Also known as
customer • contact • prospect
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article