Relatude Help

A template kind of your own

A site adds a kind of template by deriving from ITemplate and saying what renders it. Register the interface with the site's other content types, and editors create templates of the new kind like the built-in ones:

public interface IJsonTemplate : ITemplate {
    string Fields { get; set; }
}

.AddRendering(o => o.TemplateKind<IJsonTemplate>(t =>
    new ResultTarget((http, m) => Results.Json(new { m.Content.Id, m.Content.Name, fields = t.Fields }))))