Class BlogArticle
A content article belonging to a Blog. The CMS renders articles through the blog html item of the page they are shown on. Used as both the request and response body.
public sealed record BlogArticle : IBlogArticle
- Inheritance
-
objectBlogArticle
- Implements
Properties
Author
The user name of the author. A create that leaves it empty uses the authenticated user; an update stores what is sent.
[JsonPropertyName("author")]
public string? Author { get; init; }
Property Value
- string
BlogId
The id of the Blog the article belongs to. A book that does not exist is not rejected - the article is then just not reachable through a book. Deleting the book deletes its articles.
[JsonPropertyName("blogId")]
public string? BlogId { get; init; }
Property Value
- string
Changed
When the article 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 article body, as HTML - the CMS inserts it without encoding.
[JsonPropertyName("content")]
public string? Content { get; init; }
Property Value
- string
Created
When the article was created; shown by the CMS as the article's date.
[JsonPropertyName("created")]
public DateTimeOffset Created { get; init; }
Property Value
- DateTimeOffset
CustomAttributes
Additional attributes stored with the article beyond the fixed fields, by name. The CMS offers each one to
the article's templates as a %NAME% placeholder, the name in upper case.
[JsonPropertyName("customAttributes")]
public Dictionary<string, JsonElement>? CustomAttributes { get; init; }
Property Value
- Dictionary<string, JsonElement>
Headline
A headline shown with the article.
[JsonPropertyName("headline")]
public string? Headline { get; init; }
Property Value
- string
Id
The article's id. The server generates a GUID only when a create carries no id; this record always sends one (empty by default), so set it before creating.
[JsonPropertyName("id")]
public string? Id { get; init; }
Property Value
- string
Name
The article's title, and the source of UrlPath when that is left empty.
[JsonPropertyName("name")]
public string? Name { get; init; }
Property Value
- string
Position
The article's place within its book, ascending. GetContentArticlesAsync with a book sorts by it.
[JsonPropertyName("position")]
public int Position { get; init; }
Property Value
- int
UrlPath
The URL segment the CMS serves the article under. When a save leaves it empty and Name is set,
the server derives it from the title: lower case, spaces become -, / becomes _,
umlauts are transliterated and other characters dropped.
[JsonPropertyName("urlPath")]
public string? UrlPath { get; init; }
Property Value
- string