Handlebar 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.
| Parameter | Type | Description |
|---|---|---|
object | object | Required. The object to use as the context within the block. |
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.
You can also access the parent context using the ../ syntax. This code example shows how to access the parent context.
- Github: Handlebars.Net
- Handlebars Language Guide: Built-in Helpers