TaxonomyTerm Pennington.Taxonomy
One value of the taxonomy axis along with every content item that projects to it. Razor pages registered with TermPage receive an instance of this type as their Term parameter; index pages receive the full IReadOnlyList as their Terms parameter.
Properties
ItemsImmutableList<TaxonomyItem<TFrontMatter>>- Every content item that projected to this key, in the order they were discovered.
KeyTKey- The raw key value (the input to
SlugFor). Labelstring- Human-readable label. Defaults to the key's string form; override via
LabelFor. Slugstring- URL-safe slug; the last segment of
Url. UrlUrlPath- Absolute URL of this term page (e.g.
/cuisine/italian/).
Constructors
TaxonomyTerm
#public TaxonomyTerm`2(TKey Key, string Label, string Slug, UrlPath Url, ImmutableList<TaxonomyItem<TFrontMatter>> Items)
One value of the taxonomy axis along with every content item that projects to it. Razor pages registered with TermPage receive an instance of this type as their Term parameter; index pages receive the full IReadOnlyList as their Terms parameter.
Parameters
KeyTKey- The raw key value (the input to
SlugFor). Labelstring- Human-readable label. Defaults to the key's string form; override via
LabelFor. Slugstring- URL-safe slug; the last segment of
Url. UrlUrlPath- Absolute URL of this term page (e.g.
/cuisine/italian/). ItemsImmutableList<TaxonomyItem<TFrontMatter>>- Every content item that projected to this key, in the order they were discovered.
Pennington.Taxonomy.TaxonomyTerm
namespace Pennington.Taxonomy;
/// One value of the taxonomy axis along with every content item that projects to it. Razor pages registered with TermPage receive an instance of this type as their Term parameter; index pages receive the full IReadOnlyList as their Terms parameter.
public record TaxonomyTerm
{
/// Every content item that projected to this key, in the order they were discovered.
public ImmutableList<TaxonomyItem<TFrontMatter>> Items { get; set; }
/// The raw key value (the input to SlugFor).
public TKey Key { get; set; }
/// Human-readable label. Defaults to the key's string form; override via LabelFor.
public string Label { get; set; }
/// URL-safe slug; the last segment of Url.
public string Slug { get; set; }
/// One value of the taxonomy axis along with every content item that projects to it. Razor pages registered with TermPage receive an instance of this type as their Term parameter; index pages receive the full IReadOnlyList as their Terms parameter.
public TaxonomyTerm`2(TKey Key, string Label, string Slug, UrlPath Url, ImmutableList<TaxonomyItem<TFrontMatter>> Items)
;
/// Absolute URL of this term page (e.g. /cuisine/italian/).
public UrlPath Url { get; set; }
}