Models content relationships in Orchard Core using five strategies: BagPart, ContentPickerField, FlowPart, ListPart, and Taxonomies. Guides strategy selection, settings, and reverse lookups.
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.
None: SKILL.md is the whole skill.
You are an Orchard Core expert. Guide the selection and implementation of content relationship strategies — connecting content items using built-in parts and fields.
BagPart, ContentPickerField, FlowPart, ListPart, and Taxonomies.BagPart and FlowPart store child items embedded within the parent (inline editing, fast retrieval).ListPart stores child items independently but linked to a parent (separate URLs, separate editing).ContentPickerField creates references between independently managed items (many-to-many).Taxonomies provide categorization with hierarchical terms and indirect many-to-many relationships.MapIndex only for fields and relationship projections your application filters or sorts frequently.OrchardCore.Flows for BagPart and FlowPart, OrchardCore.Lists for ListPart, OrchardCore.ContentFields for ContentPickerField, and OrchardCore.Taxonomies for taxonomy fields.sealed modifier.{ "steps": [...] } format.| Strategy | Ownership | Child Editing | Child Has Own URL | Relationship | Best For |
|---|---|---|---|---|---|
BagPart | Embedded | Inline with parent | No | One-to-many | FAQ items, feature lists |
ContentPickerField | Referenced | Independent | Yes | Many-to-many | Related posts, product bundles |
FlowPart | Embedded | Inline with parent | No | One-to-many | Page layouts, widget canvases |
ListPart | Hierarchical | Independent | Yes | One-to-many | Blog → Blog Posts, Forums |
Taxonomies | Referenced | Via taxonomy editor | No (terms) | Many-to-many | Tags, categories, classifications |
BagPart stores child content items directly inside a parent. Items are edited inline and cannot exist independently.
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
// Define the child content type
await _contentDefinitionManager.AlterTypeDefinitionAsync("FaqItem", type => type
.DisplayedAs("FAQ Item")
.Stereotype("Widget")
.WithPart("FaqItem", part => part.WithPosition("0"))
);
await _contentDefinitionManager.AlterPartDefinitionAsync("FaqItem", part => part
.WithField("Question", field => field
.OfType("TextField")
.WithDisplayName("Question")
.WithPosition("0")
)
.WithField("Answer", field => field
.OfType("HtmlField")
.WithDisplayName("Answer")
.WithPosition("1")
.WithEditor("Wysiwyg")
)
);
// Attach BagPart to the parent
await _contentDefinitionManager.AlterTypeDefinitionAsync("FaqPage", type => type
.DisplayedAs("FAQ Page")
.Creatable()
.Listable()
.WithPart("TitlePart", part => part.WithPosition("0"))
.WithPart("BagPart", part => part
.WithPosition("1")
.WithDisplayName("FAQ Items")
.WithDescription("Add question-answer pairs.")
.WithSettings(new BagPartSettings
{
ContainedContentTypes = ["FaqItem"],
})
)
);
return 1;
}
}
{
"steps": [
{
"name": "Content",
"data": [
{
"ContentItemId": "[js:uuid()]",
"ContentType": "FaqPage",
"DisplayText": "Frequently Asked Questions",
"Latest": true,
"Published": true,
"TitlePart": {
"Title": "Frequently Asked Questions"
},
"BagPart": {
"ContentItems": [
{
"ContentItemId": "[js:uuid()]",
"ContentType": "FaqItem",
"DisplayText": "What is Orchard Core?",
"FaqItem": {
"Question": { "Text": "What is Orchard Core?" },
"Answer": { "Html": "<p>Orchard Core is an open-source CMS built on ASP.NET Core.</p>" }
}
}
]
}
}
]
}
]
}
ContentPickerField selects existing content items by reference. Items remain independently managed.
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterPartDefinitionAsync("BlogPost", part => part
.WithField("RelatedPosts", field => field
.OfType("ContentPickerField")
.WithDisplayName("Related Posts")
.WithPosition("5")
.WithSettings(new ContentPickerFieldSettings
{
Multiple = true,
DisplayedContentTypes = ["BlogPost"],
})
)
);
return 1;
}
}
| Setting | Description |
|---|---|
Required / Hint | Standard field settings (at least one item, editor hint). |
Multiple | Allow selecting several items. |
DisplayAllContentTypes | Allow any content type. |
DisplayedContentTypes | Selectable types when DisplayAllContentTypes is false. |
DisplayedStereotypes | Restrict to types with one of these stereotypes; takes precedence over DisplayedContentTypes. |
Placeholder | Placeholder text of the picker input. |
TitlePattern | Liquid pattern for each item's title in the picker, default {{ Model.ContentItem | display_text }}. With LocalizationPart, use {{ Model.ContentItem | display_text }} ({{ Model.ContentItem.Content.LocalizationPart.Culture }}). |
ContentPickerFieldSettings is in OrchardCore.ContentFields.Settings. The field stores string[] ContentItemIds.
{% assign related = Model.ContentItem.Content.BlogPost.RelatedPosts.ContentItemIds | content_item_id %}
{% for item in related %}
<a href="{{ item | display_url }}">{{ item.DisplayText }}</a>
{{ item | shape_build_display: "Summary" | shape_render }}
{% endfor %}
@foreach (var item in await Orchard.GetContentItemsByIdAsync(Model.ContentItemIds))
{
@await Orchard.DisplayAsync(item, "Summary")
}
A picker stores IDs only on the referencing side. Enable OrchardCore.ContentFields.Indexing.SQL and query ContentPickerFieldIndex to find referencing items:
using OrchardCore.ContentFields.Indexing.SQL;
using OrchardCore.ContentManagement;
using YesSql;
namespace MyModule.Services;
public sealed class RelatedPostsService
{
private readonly ISession _session;
public RelatedPostsService(ISession session)
{
_session = session;
}
public Task<IEnumerable<ContentItem>> GetPostsReferencingAsync(string contentItemId)
=> _session
.Query<ContentItem, ContentPickerFieldIndex>(x =>
x.ContentType == "BlogPost" &&
x.ContentField == "RelatedPosts" &&
x.SelectedContentItemId == contentItemId &&
x.Published)
.ListAsync();
}
For localized sites use LocalizationSetContentPickerField, which stores localization sets instead of item IDs so the picked content resolves to the current culture.
FlowPart allows building structured, responsive page layouts with embedded widgets. Similar to BagPart but adds layout positioning.
Widgets inside FlowPart and BagPart are sorted by drag and drop; with OrchardCore.ContentPreview enabled, every drop refreshes the live preview. See orchardcore-flow-bagpart for settings and templates.
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterTypeDefinitionAsync("Page", type => type
.DisplayedAs("Page")
.Creatable()
.Listable()
.Draftable()
.Versionable()
.WithPart("TitlePart", part => part.WithPosition("0"))
.WithPart("FlowPart", part => part.WithPosition("1"))
);
return 1;
}
}
ListPart connects independently managed content items in a parent-child hierarchy. Children have their own URLs and are edited separately. See orchardcore-lists for settings, ContainedPartIndex queries, and page size selection.
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterTypeDefinitionAsync("Blog", type => type
.DisplayedAs("Blog")
.Creatable()
.Listable()
.WithPart("TitlePart", part => part.WithPosition("0"))
.WithPart("ListPart", part => part
.WithPosition("1")
.WithSettings(new ListPartSettings
{
ContainedContentTypes = ["BlogPost"],
PageSize = 10,
})
)
);
await _contentDefinitionManager.AlterTypeDefinitionAsync("BlogPost", type => type
.DisplayedAs("Blog Post")
.Creatable()
.Draftable()
.Versionable()
.WithPart("TitlePart", part => part.WithPosition("0"))
.WithPart("MarkdownBodyPart", part => part.WithPosition("1"))
);
return 1;
}
}
Taxonomies provide categorization and tagging of content items using Terms. Terms can be hierarchical (categories with sub-categories) or flat (tags).
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterPartDefinitionAsync("BlogPost", part => part
.WithField("Tags", field => field
.OfType("TaxonomyField")
.WithDisplayName("Tags")
.WithPosition("3")
.WithEditor("Tags")
.WithSettings(new TaxonomyFieldSettings
{
TaxonomyContentItemId = "{{tagsTermTaxonomyContentItemId}}",
Unique = false,
})
)
.WithField("Category", field => field
.OfType("TaxonomyField")
.WithDisplayName("Category")
.WithPosition("4")
.WithSettings(new TaxonomyFieldSettings
{
TaxonomyContentItemId = "{{categoryTaxonomyContentItemId}}",
Unique = true,
})
)
);
return 1;
}
}
{
"steps": [
{
"name": "Content",
"data": [
{
"ContentItemId": "tags-taxonomy",
"ContentType": "Taxonomy",
"DisplayText": "Tags",
"Latest": true,
"Published": true,
"TitlePart": {
"Title": "Tags"
},
"TaxonomyPart": {
"TermContentType": "Tag",
"Terms": [
{
"ContentItemId": "[js:uuid()]",
"ContentType": "Tag",
"DisplayText": "Technology",
"TitlePart": { "Title": "Technology" }
},
{
"ContentItemId": "[js:uuid()]",
"ContentType": "Tag",
"DisplayText": "Lifestyle",
"TitlePart": { "Title": "Lifestyle" }
}
]
}
}
]
}
]
}
BagPart.FlowPart.ListPart.ContentPickerField.Taxonomies.Official Orchard Core videos shown on the documentation page:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, content-relationships, cms, content-picker, bag-part, flow-part, list-part
/orchardcore:orchardcore-content-relationshipsfrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcore140 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-admin-edit-viewsSkill for writing Orchard Core admin editor views with the ocat CSS classes and cards. Covers Edit views for content parts and fields, field editor variants, part, field and site settings editors, Fields.Edit views, admin pages rendering Model.Editor built with IDisplayManager, the ocat classes and their layout rules, label associations and group captions, part and field wrapper classes, validation, hints and the Hint_Admin shape, cards declared in placement and the Card and CardContainer shapes, split editor shapes, tabs and columns, the edit page action bar, the horizontal form layout, and the UI text casing standard. Use this skill when requests mention Orchard Core admin edit views, admin forms, grouping fields in cards, Edit.cshtml, Fields.Edit.cshtml, Settings.Edit.cshtml, ocat classes, label casing, or field hints. Strong matches include ocat-wrapper, ocat-card, Hint_Admin, PlacementLocationBuilder, IDisplayManager, ContentPartDisplayDriver, SiteDisplayDriver./orchardcore-admin-listsSkill for Orchard Core 4.0 admin index views (list pages) rendered with the AdminList shape. Covers the List and Grid layouts, AdminListContext of TModel, the admin-list and admin-list-column tag helpers, column width and alignment, row display drivers placing shapes for SummaryAdmin and SummaryAdminGrid, row templates and zones, AdminListActions Buttons and Menu layouts, AdminListToolbar, AdminListSearch, the list-management script for select-all and bulk actions, IAdminListColumnsProvider, AdminListOptions, user layout selection, per-list alternates, sortable lists, and upgrading overridden list views. Use this skill when requests mention Orchard Core admin index views, an admin index page, admin lists, converting a hand-written admin listing, grid layout, list columns, row actions menu, or adding a column to the content items list. Strong matches include OrchardCore.Admin.Abstractions, AdminListContext, AdminListColumn, IAdminListColumnsProvider, AdminListOptions, AdminListLayout, ContentsAdminList./orchardcore-admin-menuSkill for creating admin menus in Orchard Core. Covers admin menu content, the link, placeholder, content types, and lists admin node types, the AdminMenu recipe and deployment step, ManageAdminMenu, ViewAdminMenuAll and per-menu ViewAdminMenu permissions from AdminMenuPermissions, custom admin nodes with AdminNode, IAdminNodeNavigationBuilder and AddAdminNode, data localization of node text, rendering in the 4.0 TheAdmin menu, and upgrading from the removed legacy admin menu layout. Use this skill when requests mention Orchard Core Admin Menu, Create and Manage Admin Menus, Admin Menu Deployment Recipe Step, Built-In Admin Node Types, Custom Admin Node Class, LegacyAdminMenuNavigation, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminMenu, OrchardCore.AdminMenu.Abstractions, AdminMenuPermissions, LinkAdminNode, PlaceholderAdminNode, OrchardCore.Lists, OrchardCore.Navigation./orchardcore-admin-schemesSkill for the Orchard Core 4.0 TheAdmin redesign and its admin schemes. Covers scheme records with their four colors, typography, density, corners, horizontal form layout and content width, Design > Themes > Schemes, the default scheme, the per-user scheme picker and its cookie, the seven built-in schemes, the AdminSchemes recipe step and Admin Schemes deployment step, the schemes.css stylesheet, the --ta-* design tokens, ta-content-fluid, dark mode utilities and nested color modes, TheOldAdmin and how to switch to it, and the breaking changes for custom admin themes and Layout overrides. Use this skill when requests mention admin schemes, admin colors, rebranding TheAdmin, dark mode of the admin, the admin content width, the horizontal form layout, TheOldAdmin, or upgrading a custom admin theme to the new TheAdmin. Strong matches include AdminScheme, AdminSchemes, DefaultSchemeId, HorizontalFormLayout, ContentWidth, data-ta-scheme, --ta-primary, ta-content-fluid, TheOldAdmin, and OrchardCore.Themes.TheAdmin.Other plugins' skills for the same job