<!-- This file is auto-generated by the docs:generate-viewhelper-docs command. Do not edit directly -->

# ui:context

**Reference:** [View Source](https://github.com/jramke/fluid-primitives/tree/main/Classes/ViewHelpers/ContextViewHelper.php)

Access the context of another parent component.

This is useful when you have nested components and you want to access the context of a parent component from another type. You cannot access the context of the current component using this ViewHelper. Use the exposed "context" variable instead.

## Example
```html
<ui:context name="dialog" as="dialogContext" />
```

## Arguments

| Name | Type | Description | Required | Default |
|------|------|-------------|----------|--------|
| `name` | string | The camelCase base name of the component of which we want the context (e.g. &quot;fileUpload&quot;) | Yes | - |
| `as` | string | Variable name to assign the result to | No | '' |
