Class CmsItemTemplate
A per-tag, per-language HTML item template - how one html item is rendered. Tag, Name and Language together are its key. Used as both the request and response body.
public sealed record CmsItemTemplate : ICmsItemTemplate
- Inheritance
-
objectCmsItemTemplate
- Implements
Properties
Attribute
The tag attribute that names this template (see TemplateAttributeName). Not part of the key and not used to look a template up; templates the server seeds from its own files store an empty string.
[JsonPropertyName("attributeName")]
public string? Attribute { get; init; }
Property Value
- string
Changed
When the template was last saved. Set by the server on every save; a value sent is ignored.
[JsonPropertyName("changed")]
public DateTimeOffset Changed { get; init; }
Property Value
- DateTimeOffset
Content
The template's markup.
[JsonPropertyName("content")]
public string? Content { get; init; }
Property Value
- string
Created
When the template was created. Set by the server; a value sent is ignored.
[JsonPropertyName("created")]
public DateTimeOffset Created { get; init; }
Property Value
- DateTimeOffset
Language
The language this variant is for, such as de-DE or de; empty for the language-independent
default. The CMS renders the variant whose language equals the visitor's region, else one that starts
with the visitor's language, else the default.
[JsonPropertyName("language")]
public string Language { get; init; }
Property Value
- string
Name
The template's id within its tag - the value an html item's template attribute names. Serialized as
id. Required on create.
[JsonPropertyName("id")]
public string? Name { get; init; }
Property Value
- string
Owner
A legacy owner tag, stored and returned as is; SearchHtmlItemTemplatesAsync can filter on it. The
render engine does not use it.
[JsonPropertyName("owner")]
public string? Owner { get; init; }
Property Value
- string
Path
A path stored with the template and returned as is. The render engine does not read it.
[JsonPropertyName("path")]
public string? Path { get; init; }
Property Value
- string
Tag
The html item this template belongs to. PAGE is special: it is the base layout a CMS website is
rendered into, and every other tag is an item placed inside that layout.
[JsonPropertyName("tagName")]
public string? Tag { get; init; }
Property Value
- string
UserId
The user who last saved the template, set by the server from the authenticated user on every save.
Templates the server seeds from its own files carry SYSTEM, and are refreshed from those files for
as long as nobody has changed them.
[JsonPropertyName("userId")]
public string? UserId { get; init; }
Property Value
- string