Creates and manages taxonomies, terms, and TaxonomyField settings in Orchard Core. Covers hierarchical terms, TermEditorActions, TaxonomyIndex queries, Liquid filters, admin list filters, and recipe-based setup.
Ships in orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an Orchard Core expert. Generate taxonomy definitions, terms, and taxonomy field configurations.
OrchardCore.Taxonomies to use taxonomy features.Taxonomy that contains terms.TaxonomyField on content types to allow categorization.TaxonomyPart (TermContentType, Terms) is added to taxonomies and TermPart (TaxonomyContentItemId) is welded onto terms automatically; do not attach them manually.Terms array.ManageTaxonomy permission (OrchardCore.Taxonomies.Permissions.ManageTaxonomies, granted to Administrator) plus the usual content permissions.Pager, so the 4.0 Page size selection (pageSize query string) applies.OrchardCore.Taxonomies.ContentsAdminList to filter the admin content list by taxonomy terms.{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.Taxonomies"
],
"disable": []
}
]
}
{
"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}}"
}
}
]
}
]
}
{
"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"
}
}
]
}
await _contentDefinitionManager.AlterPartDefinitionAsync("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")
)
);
| Setting | Description |
|---|---|
TaxonomyContentItemId | The taxonomy whose terms can be selected. |
Unique | Only one term can be selected (radio buttons). |
LeavesOnly | Only terms without children can be selected. |
Open | Editors can create new terms from the field editor (the Tags editor defaults this to true through TaxonomyFieldTagsEditorSettings). With the Tags editor a tag typed in the search box is created by pressing Enter or clicking its Create the tag: {0} item. |
Placeholder | Placeholder of the tags input. |
Required / Hint | Standard field settings. |
The Tags editor (TaxonomyField-Tags.Edit.cshtml) is a bootstrap-select list since 4.0 (no Vue): the tags-editor style, the taxonomies-tags-editor JavaScript localizations and TaxonomiesJSLocalizer were removed, so update overrides of that view from the new one (the posted values are unchanged). The default TaxonomyField.cshtml and TaxonomyField-Tags.Display.cshtml templates render the field name before the terms, and TaxonomyField-Tags.Display.DetailAdmin.cshtml renders it as an admin row.
The field stores TaxonomyContentItemId and TermContentItemIds. With the Tags editor and display mode, the term display texts are also stored as TagNames:
{% for tagName in Model.ContentItem.Content.BlogPost.Tags.TagNames %}
<span class="badge text-bg-secondary">{{ tagName }}</span>
{% endfor %}
Republish categorized items after renaming a tag, because TagNames is a stored copy.
TaxonomyIndex has one row per selected term per field: TaxonomyContentItemId, ContentItemId, ContentType, ContentPart, ContentField, TermContentItemId, Published, and Latest.
@using YesSql.Services
@{
var termIds = Model.TermContentItemIds;
var related = await Orchard.QueryCategorizedContentItemsAsync(query => query
.Where(index => index.TermContentItemId.IsIn(termIds) &&
index.ContentItemId != Model.Part.ContentItem.ContentItemId));
}
Orchard.GetTaxonomyTermAsync(taxonomyId, termId) returns a term, and Orchard.GetInheritedTermsAsync(taxonomyId, termId) returns the term with its parents.
Create a SQL query named ContentItemsByTaxonomyTerm with Return content items disabled:
SELECT DISTINCT ContentItemId
FROM TaxonomyIndex
WHERE TermContentItemId = @termContentItemId:''
AND Published = true
Execute the query, then load its returned content item ids with the content_item_id filter:
{% assign rows = Queries.ContentItemsByTaxonomyTerm | query: termContentItemId: termId %}
{% assign contentItemIds = rows | map: "ContentItemId" %}
{% assign items = contentItemIds | content_item_id %}
{% for item in items %}
{{ item | display_text }}
{% endfor %}
Add AutoroutePart to the Taxonomy type with AllowRouteContainedItems, then enable Route contained items on the taxonomy item. The taxonomy renders through the TaxonomyPart shape and each term route renders TermPart, which lists the content items categorized with that term (and its children) with a full pager.
Implement IContentsTaxonomyListFilter (namespace OrchardCore.Taxonomies.Core) to add restrictions to the query used by a term listing, or replace IContentsTaxonomyListQueryService (QueryAsync(TermPart, Pager)) for full control. Keep filters focused on query constraints and let the built-in listing handle paging.
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Records;
using OrchardCore.Taxonomies.Core;
using OrchardCore.Taxonomies.Models;
using YesSql;
namespace MyModule.Taxonomies;
public sealed class ArticlesOnlyTaxonomyListFilter : IContentsTaxonomyListFilter
{
public Task FilterAsync(IQuery<ContentItem> query, TermPart termPart)
{
query.With<ContentItemIndex>(x => x.ContentType == "Article");
return Task.CompletedTask;
}
}
Register it with services.AddScoped<IContentsTaxonomyListFilter, ArticlesOnlyTaxonomyListFilter>();.
{% shape "term", alias: "alias:Categories" %}
{% shape "term", TaxonomyContentItemId: taxonomyId, TermContentItemId: termId %}
<shape type="Term" alias="alias:Categories" />
The Term shape holds TermItem shapes (Level, TermContentItem, Items, Differentiator); each item is morphed into TermContentItem for rendering. Alternates include Term-Categories.cshtml, TermItem-Category-level-2.cshtml, and TermContentItem-Categories.cshtml.
With OrchardCore.Taxonomies.ContentsAdminList enabled, choose which taxonomies appear as filters in the admin content list in Settings → Taxonomy Filters, or with a recipe:
{
"steps": [
{
"name": "settings",
"TaxonomyContentsAdminListSettings": {
"TaxonomyContentItemIds": [
"{{TaxonomyContentItemId}}"
]
}
}
]
}
Taxonomies are content items edited from Content → Content Items (filter by the Taxonomy type). In the taxonomy editor each term row (Content.TermAdmin) puts its Edit, Add and Delete buttons in its Actions zone and renders them through AdminListActions, so they follow Settings → Admin → Appearance → Actions layout (Buttons or one ellipsis Menu) like admin list rows. An override of Content.TermAdmin.cshtml should add extra buttons to that zone and render @await DisplayAsync(await Factory.CreateAdminListActionsAsync((IShape)Model)) (see orchardcore-admin-lists). The editor finds terms by ContentItemId, so give every term in a recipe a unique one (for example "[js: uuid()]").
OrchardCore.Taxonomies AdminController Create/Edit) shows Cancel and a Save term button rendered by the TermEditorActions shape, instead of the Publish/Delete actions of a content item; override TermEditorActions.cshtml to change them.ContentItem (with TermPart welded): CreatingAsync/CreatedAsync on create and UpdatingAsync/UpdatedAsync on edit, the -ed events only when the editor is valid and before the term is merged into the taxonomy. Content handlers can therefore stamp or validate term data like any other content item; publish and remove events are not raised for the term itself.{% assign terms = Model.ContentItem.Content.BlogPost.Categories | taxonomy_terms %}
{% for term in terms %}
<span class="badge">{{ term.DisplayText }}</span>
{% endfor %}
{% assign taxonomyId = Model.ContentItem.Content.BlogPost.Categories.TaxonomyContentItemId %}
{% for termId in Model.ContentItem.Content.BlogPost.Categories.TermContentItemIds %}
{% assign path = termId | inherited_terms: taxonomyId %}
{% for t in path %}{{ t.DisplayText }} / {% endfor %}
{% endfor %}
Create a custom term type with additional fields:
await _contentDefinitionManager.AlterTypeDefinitionAsync("Category", type => type
.DisplayedAs("Category")
.WithPart("TitlePart")
.WithPart("Category", part => part
.WithPosition("1")
)
);
await _contentDefinitionManager.AlterPartDefinitionAsync("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")
)
);
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
140 skills in this plugin
/orchardcore-adminGuidance for the Orchard Core admin panel, including admin controllers and routes, admin menu registration with AdminNavigationProvider, ocat editor forms grouped in cards, admin pages rendering Model.Editor, the UI text casing standard, TheAdmin layout and menu colors, admin branding, the Navbar shape, the Ctrl+K quick navigation palette and QuickNavigationSource, AdminSettings such as MenuBehavior, ShowBreadcrumb, DisplayQuickNavigation, DisplayTitlesInTopbar and ActionsLayout, the AdminDashboard shape, settings pages, and admin filters and zones. Use this skill when requests mention the Orchard Core admin panel, TheAdmin, admin controllers, admin menu registration, an icon on an admin menu item, the AdminSettings recipe step, quick navigation, navigation menu behavior, the admin URL prefix, UI text casing. Strong matches include OrchardCore.Admin, AdminSettings, AdminPermissions, AdminOptions, AdminAttribute, SiteDisplayDriver, IDisplayManager./orchardcore-admin-dashboardSkill for creating admin dashboard widgets in Orchard Core. Covers the DashboardWidget stereotype, DashboardPart position and sizing, the built-in HtmlDashboardWidget, ContentsMetadata and ContentsTags widget types, custom widget content types via recipe or migration, arranging widgets in Manage Dashboard mode, widget template customization, provisioning widgets with recipes, dashboard permissions, the DashboardBreadcrumbProvider Dashboard ancestor, and the AdminDashboardContent shape used when the feature is disabled. Use this skill when requests mention Orchard Core Admin Dashboard, Create and Configure Dashboard Widgets, Enabling Admin Dashboard, Widget Configuration Properties, dashboard widget recipes, Dashboard breadcrumb, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminDashboard, DashboardPart, DashboardBreadcrumbProvider, AccessAdminDashboard, ManageAdminDashboard./orchardcore:orchardcore-taxonomiesfrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcoreOther plugins' skills for the same job