Manages data used to render templates.
TemplateContext is defined in the Telligent.Evolution.Extensibility.Api.Entities.Version1 namespace of Telligent.Evolution.Platform.dll
Definition
class TemplateContext
{
Object Item { get; }
string PostTarget { get; set; }
void AddItem(Guid dataTypeId, Object item);
T Get<T>(Guid id);
}
Properties
| Name | Type | Description | Default | Options |
|---|---|---|---|---|
| Item | Object | Access a context object by datatype identifier. | ||
| PostTarget | string | Specify the target environment this context will be rendered to. Options: Unknown, Web, Syndication, Offline, Other, Print, Nntp, Email, WebQuote, WebServices |
Methods
void AddItem(Guid dataTypeId, Object item);
Add an data object to the context by datatype identifier.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| dataTypeId | Guid | Data Type Id | Required | ||
| item | Object | Item | Required |
T Get<T>(Guid id);
Access a context object by datatype identifier and recieve the object casted as the specified class.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id | Required |
Return Type
T