Skip to main content
AI/MLCrestApps

orchardcore-taxonomies

Skill for creating and managing taxonomies in Orchard Core. Covers taxonomy creation, taxonomy terms, taxonomy fields, and taxonomy-based content organization. Use this skill when requests mention Orchard Core Taxonomies, Create and Manage Taxonomies, Enabling Taxonomy Features, Creating a Taxonomy via Recipe, Hierarchical Terms (Nested), Attaching TaxonomyField to a Content Type, or closely related Orchard Core implementation, setup, extension, or troubleshooting work. Strong matches include work with OrchardCore.Taxonomies, TaxonomyField, TermPart, TitlePart, AliasPart, TaxonomyPart, AlterPartDefinition, WithField, WithSettings, TaxonomyFieldSettings, AlterTypeDefinition, WithPart. It also helps with taxonomy examples, Hierarchical Terms (Nested), Attaching TaxonomyField to a Content Type, Querying by Taxonomy Terms in Liquid, plus the code patterns, admin flows, recipe steps, and referenced examples captured in this skill.

Stars
13
Source
CrestApps/CrestApps.AgentSkills
Updated
2026-05-29
Slug
CrestApps--CrestApps.AgentSkills--orchardcore-taxonomies
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/CrestApps/CrestApps.AgentSkills/HEAD/plugins/orchardcore/skills/orchardcore-taxonomies/SKILL.md -o .claude/skills/orchardcore-taxonomies.md

Drops the SKILL.md into .claude/skills/orchardcore-taxonomies.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

Orchard Core Taxonomies - Prompt Templates

Create and Manage Taxonomies

You are an Orchard Core expert. Generate taxonomy definitions, terms, and taxonomy field configurations.

Guidelines

  • Enable OrchardCore.Taxonomies to use taxonomy features.
  • A Taxonomy is a content item of type Taxonomy that contains terms.
  • Terms are hierarchical content items within a taxonomy.
  • Use TaxonomyField on content types to allow categorization.
  • Taxonomies can be flat (tags) or hierarchical (categories).
  • Terms can have custom content parts and fields.
  • Use TermPart for content items that serve as taxonomy terms.

Enabling Taxonomy Features

{
  "steps": [
    {
      "name": "Feature",
      "enable": [
        "OrchardCore.Taxonomies"
      ],
      "disable": []
    }
  ]
}

Creating a Taxonomy via Recipe

{
  "steps": [
    {
      "name": "Content",
      "data": [
        {
          "ContentItemId": "{{TaxonomyId}}",
          "ContentType": "Taxonomy",
          "DisplayText": "{{TaxonomyName}}",
          "Latest": true,
          "Published": true,
          "TitlePart": {
            "Title": "{{TaxonomyName}}"
          },
          "AliasPart": {
            "Alias": "{{taxonomy-alias}}"
          },
          "TaxonomyPart": {
            "Terms": [
              {
                "ContentItemId": "{{TermId1}}",
                "ContentType": "{{TermContentType}}",
                "DisplayText": "{{TermName1}}",
                "TitlePart": {
                  "Title": "{{TermName1}}"
                }
              },
              {
                "ContentItemId": "{{TermId2}}",
                "ContentType": "{{TermContentType}}",
                "DisplayText": "{{TermName2}}",
                "TitlePart": {
                  "Title": "{{TermName2}}"
                }
              }
            ],
            "TermContentType": "{{TermContentType}}"
          }
        }
      ]
    }
  ]
}

Hierarchical Terms (Nested)

{
  "ContentItemId": "term-parent",
  "ContentType": "Category",
  "DisplayText": "Parent Category",
  "TitlePart": {
    "Title": "Parent Category"
  },
  "Terms": [
    {
      "ContentItemId": "term-child-1",
      "ContentType": "Category",
      "DisplayText": "Child Category 1",
      "TitlePart": {
        "Title": "Child Category 1"
      }
    },
    {
      "ContentItemId": "term-child-2",
      "ContentType": "Category",
      "DisplayText": "Child Category 2",
      "TitlePart": {
        "Title": "Child Category 2"
      }
    }
  ]
}

Attaching TaxonomyField to a Content Type

_contentDefinitionManager.AlterPartDefinition("BlogPost", part => part
    .WithField("Categories", field => field
        .OfType("TaxonomyField")
        .WithDisplayName("Categories")
        .WithSettings(new TaxonomyFieldSettings
        {
            TaxonomyContentItemId = "{{TaxonomyContentItemId}}",
            Unique = false,
            LeavesOnly = false
        })
        .WithPosition("0")
    )
    .WithField("Tags", field => field
        .OfType("TaxonomyField")
        .WithDisplayName("Tags")
        .WithEditor("Tags")
        .WithSettings(new TaxonomyFieldSettings
        {
            TaxonomyContentItemId = "{{TagsTaxonomyContentItemId}}"
        })
        .WithPosition("1")
    )
);

Querying by Taxonomy Terms in Liquid

{% assign items = Content | where: "Content.BlogPost.Categories.TermContentItemIds", "contains", termId %}

Displaying Taxonomy Terms

{% for termId in Model.ContentItem.Content.BlogPost.Categories.TermContentItemIds %}
    {% assign term = termId | content_item %}
    <span class="badge">{{ term.DisplayText }}</span>
{% endfor %}

Custom Term Content Type

Create a custom term type with additional fields:

_contentDefinitionManager.AlterTypeDefinition("Category", type => type
    .DisplayedAs("Category")
    .Stereotype("Term")
    .WithPart("TitlePart")
    .WithPart("Category", part => part
        .WithPosition("1")
    )
);

_contentDefinitionManager.AlterPartDefinition("Category", part => part
    .WithField("Icon", field => field
        .OfType("TextField")
        .WithDisplayName("Icon CSS Class")
        .WithPosition("0")
    )
    .WithField("Description", field => field
        .OfType("TextField")
        .WithDisplayName("Description")
        .WithEditor("TextArea")
        .WithPosition("1")
    )
);