---
schema_version: "1"
id: 8c519ce69911af5be88743952eed27284e737c95b78806e400df604d66827c08
title: "Handlebars Helper Function: with"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/handlebars/reference/utility/mcn-handlebars-reference-utility-with.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-utility-references/mcn-handlebars-reference-utility-with.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b2ce27a4e997d2ce7497560abdacbd233255bb0f24fcdc10edb2c96807e528d3
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# Handlebars Helper Function: with

Changes the context within a block to a specified object so that you can access properties without repeating the object name. This built-in helper is provided by the Handlebars.Net library.

## Availability

This helper is available in the Winter ’26 release of Marketing Cloud Next.

## Syntax

```handlebars
{{#with object}}
  Value1: {{value1}}
  Value2: {{value2}}
  ...
{{/with}}
```

## Parameters

| Parameter | Type   | Description                                                  |
| --------- | ------ | ------------------------------------------------------------ |
| `object`  | Object | Required. The object to use as the context within the block. |

## Return Value

The function renders the block template with the specified object as the context. Within the block, you can access properties directly without the object name. You can access the root context using `@root`. This code example shows how to access the root context.

```handlebars
{{#with user}}
  User: {{name}}
  Root context: {{@root.title}}
{{/with}}
```

You can also access the parent context using the `../` syntax. This code example shows how to access the parent context.

```handlebars
{{#with user}}
  User: {{name}}
  Parent context: {{../title}}
{{/with}}
```

## See Also

- _Github_: [Handlebars.Net](https://github.com/Handlebars-Net/Handlebars.Net)
- _Handlebars Language Guide_: [Built-in Helpers](https://handlebarsjs.com/guide/builtin-helpers.html#with)
