Specifies ViewData to use for each page based on the current input
document and context.
- Namespace
- Statiq
.Razor - Containing Type
- RenderRazor
Syntax
public RenderRazor WithViewData(string key, Config<object> model)
Parameters
| Name | Type | Description |
|---|---|---|
| key | string | The view data key. |
| model | Config |
A delegate that returns the model. |
Return Value
| Type | Description |
|---|---|
| RenderRazor | The current module instance. |