# How do I show different content based on lead data?

URL: https://help.hubhus.com/kb/how-do-i-show-different-content-based-on-lead-data
Category: Campaigns & Lead Management / Placeholders
Updated: 2026-09-28T14:40:29.809+00:00

Summary: Use @if(condition){ content }@endif or @if(condition){ ... }@else{ ... }@endif . Any Hubhus placeholder can be the condition. Operators: == != &#126;= (contains) >= &lt;= . 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 (&#126;=)**. @if( `%lead_email%` &#126;= @gmail.com){ You are using a Gmail address... }@endif
  `~=` is case-insensitive contains check.
4. **Select field value check**. @if(@select&#91;select_customer-type,slug&#93; == 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.

## Related articles

- https://help.hubhus.com/kb/how-do-i-edit-email-templates
- https://help.hubhus.com/kb/understanding-placeholders-and-dynamic-content
- https://help.hubhus.com/kb/working-with-the-template-editor
- https://help.hubhus.com/kb/how-do-i-display-checklists-or-tables-in-emails
