Creates and manages admin menus in Orchard Core, covering built-in node types, custom admin nodes, permissions, deployment steps, and TheAdmin menu rendering.
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. Generate admin menus, custom admin node types, and admin menu configurations for Orchard Core.
OrchardCore.AdminMenu for custom admin menu support. Admin menus are managed under Tools → Admin Menus (the AdminMenus admin list).AdminMenu recipe steps.action-bar-secondary: Edit admin nodes on a menu, Delete on a node), then the btn-primary Save (on a node a split button with Save and continue) last. Custom node editors ({Node}.Fields.TreeEdit.cshtml) contribute rows only, never buttons (see orchardcore-admin-edit-views).bootstrap-select <select multiple data-permission-picker> (with data-live-search, data-show-selected-tags and data-values-input pointing at the hidden SelectedPermissionNames input), loaded with <style asp-name="bootstrap-select" at="Head"> and <script asp-name="bootstrap-select" at="Foot">. The admin-menu-permission-picker style, the admin-menu-permission-picker-created event, the permission-picker JavaScript localizations and AdminMenuJSLocalizer were removed (OC #20303); overrides of LinkAdminNode.Fields.TreeEdit.cshtml or PlaceholderAdminNode.Fields.TreeEdit.cshtml must be updated from the new views.MenuItem.TreeSummary) puts its Edit and Delete buttons in its Actions zone and its Enable or Disable action in its ActionsMenu zone, rendered with AdminListActions, so they follow Settings → Admin → Appearance → Actions layout (Buttons or Menu).Model.Editor built by drivers of AdminMenuCreateViewModel and AdminMenuEditViewModel (a General card), and node editors place their shape in a card (Link, Placeholder) with a Position card added by AdminNodePositionDisplayDriver.OrchardCore.AdminMenu.AdminMenuPermissions class (OrchardCore.AdminMenu.Abstractions).services.AddAdminNode<TNode, TBuilder, TDriver>().AdminNodes folder by convention; admin node views must live in Views/Items/.AdminNavigationProvider (see orchardcore-admin) instead of this feature.AddClass(...) to attach Font Awesome classes to code-first navigation items; use an item id with NavigationItemText-{id}.Id.cshtml. Admin nodes store their icon in IconClass, which the builder adds with the icon-class- prefix for TheAdmin.{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.AdminMenu"
],
"disable": []
}
]
}
Export admin menus via a deployment plan (Admin Menu step), then use the generated JSON as a recipe step:
{
"steps": [
{
"name": "AdminMenu",
"data": [
{
"Id": "{{AdminMenuId}}",
"Name": "{{AdminMenuName}}",
"Enabled": true,
"MenuItems": [
{
"$type": "PlaceholderAdminNode",
"MenuName": "{{AdminMenuName}}",
"LinkText": "{{GroupText}}",
"IconClass": "fa-solid fa-{{icon}}",
"UniqueId": "{{UniqueGroupNodeId}}",
"Enabled": true,
"Items": [
{
"$type": "LinkAdminNode",
"MenuName": "{{AdminMenuName}}",
"LinkText": "{{LinkText}}",
"LinkUrl": "{{LinkUrl}}",
"PermissionNames": [],
"UniqueId": "{{UniqueNodeId}}",
"Enabled": true,
"Items": []
}
]
}
]
}
]
}
]
}
Id generates a new menu; an existing Id replaces that menu.MenuName must match the Name of the containing admin menu; the step fills it in for every node on import.ContentTypeName and ContentTypeDisplayName. Older recipes that only set ContentTypeId are migrated on import, but do not write ContentTypeId in new recipes.LinkUrl values (~/... or Contents/...) are prefixed with the admin URL prefix; absolute URLs and paths starting with / are kept as is.| Node Type | Module | Description |
|---|---|---|
Link Admin Node (LinkAdminNode) | OrchardCore.AdminMenu | Text, URL, optional target, Font Awesome IconClass, and PermissionNames required to see it. |
Placeholder Admin Node (PlaceholderAdminNode) | OrchardCore.AdminMenu | Text, IconClass, and PermissionNames without a link; groups child nodes. |
| Content Types Admin Node | OrchardCore.Contents | A menu item per selected content type, linking to its content list. |
| Lists Admin Node | OrchardCore.Lists | A menu item per content item that has a ListPart (e.g. each Blog). |
using System.ComponentModel.DataAnnotations;
using OrchardCore.AdminMenu.Models;
namespace MyModule.AdminNodes;
public sealed class CustomAdminNode : AdminNode
{
[Required]
public string LinkText { get; set; }
[Required]
public string LinkUrl { get; set; }
public string IconClass { get; set; }
}
AdminNode derives from MenuItem and adds UniqueId and Enabled. AddAdminNode registers the type for polymorphic JSON ($type) serialization.
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using OrchardCore.AdminMenu.Services;
using OrchardCore.Navigation;
namespace MyModule.AdminNodes;
public sealed class CustomAdminNodeNavigationBuilder : IAdminNodeNavigationBuilder
{
private readonly ILogger _logger;
public CustomAdminNodeNavigationBuilder(ILogger<CustomAdminNodeNavigationBuilder> logger)
{
_logger = logger;
}
public string Name => nameof(CustomAdminNode);
public Task BuildNavigationAsync(MenuItem menuItem, NavigationBuilder builder, IEnumerable<IAdminNodeNavigationBuilder> treeNodeBuilders)
{
var node = menuItem as CustomAdminNode;
if (node == null || string.IsNullOrEmpty(node.LinkText) || !node.Enabled)
{
return Task.CompletedTask;
}
return builder.AddAsync(new LocalizedString(node.LinkText, node.LinkText), async itemBuilder =>
{
// MenuName selects the data localization context of the text in TheAdmin.
itemBuilder.MenuName(node.MenuName);
itemBuilder.Url(node.LinkUrl);
itemBuilder.Priority(node.Priority);
itemBuilder.Position(node.Position);
node.IconClass?.Split(' ').ToList()
.ForEach(c => itemBuilder.AddClass(NavigationConstants.CssClassPrefix + c));
foreach (var childNode in menuItem.Items)
{
try
{
var childBuilder = treeNodeBuilders.FirstOrDefault(x => x.Name == childNode.GetType().Name);
if (childBuilder != null)
{
await childBuilder.BuildNavigationAsync(childNode, itemBuilder, treeNodeBuilders);
}
}
catch (Exception e)
{
_logger.LogError(e, "An exception occurred while building the '{MenuItem}' child menu item.", childNode.GetType().Name);
}
}
});
}
}
To restrict a node by permissions, store permission names on the node and resolve them with IPermissionService (OrchardCore.Security.Permissions) before calling itemBuilder.Permissions(...), as LinkAdminNodeNavigationBuilder does.
using Microsoft.Extensions.Localization;
using OrchardCore.AdminMenu.Models;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;
using OrchardCore.Navigation;
namespace MyModule.AdminNodes;
public sealed class CustomAdminNodeDriver : DisplayDriver<MenuItem, CustomAdminNode>
{
internal readonly IStringLocalizer S;
public CustomAdminNodeDriver(IStringLocalizer<CustomAdminNodeDriver> stringLocalizer)
{
S = stringLocalizer;
}
public override IDisplayResult Display(CustomAdminNode model, BuildDisplayContext context)
{
return Combine(
View("CustomAdminNode_Fields_TreeSummary", model)
.Location("TreeSummary", "Content"),
View("CustomAdminNode_Fields_TreeThumbnail", model)
.Location("TreeThumbnail", "Content")
);
}
public override IDisplayResult Edit(CustomAdminNode model, BuildEditorContext context)
{
return Initialize<CustomAdminNodeViewModel>("CustomAdminNode_Fields_TreeEdit", viewModel =>
{
viewModel.LinkText = model.LinkText;
viewModel.LinkUrl = model.LinkUrl;
viewModel.IconClass = model.IconClass;
}).Location(l => l.Zone("Content").Card(S["Custom link"], "10"));
}
public override async Task<IDisplayResult> UpdateAsync(CustomAdminNode model, UpdateEditorContext context)
{
var viewModel = new CustomAdminNodeViewModel();
await context.Updater.TryUpdateModelAsync(viewModel, Prefix);
model.LinkText = viewModel.LinkText;
model.LinkUrl = viewModel.LinkUrl;
model.IconClass = viewModel.IconClass;
return Edit(model, context);
}
}
Views: Views/Items/CustomAdminNode.Fields.TreeSummary.cshtml, CustomAdminNode.Fields.TreeThumbnail.cshtml, and CustomAdminNode.Fields.TreeEdit.cshtml. The TreeEdit view renders ocat-* rows only (see orchardcore-admin-edit-views); its card comes from the driver's placement.
namespace MyModule.AdminNodes;
public class CustomAdminNodeViewModel
{
public string LinkText { get; set; }
public string LinkUrl { get; set; }
public string IconClass { get; set; }
}
using OrchardCore.AdminMenu;
using OrchardCore.Modules;
namespace MyModule;
[Feature("MyModule.AdminMenu")]
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddAdminNode<CustomAdminNode, CustomAdminNodeNavigationBuilder, CustomAdminNodeDriver>();
}
}
With OrchardCore.DataLocalization enabled, admin menu names and the texts of Link and Placeholder nodes are listed in Data Localization under the context returned by DataLocalizationContext.AdminMenu(menuName) (Admin Menus plus the menu name). For a custom node, derive from AdminNodeDataLocalizationProvider and register it as an ILocalizationDataProvider:
using OrchardCore.AdminMenu;
using OrchardCore.AdminMenu.Services;
using OrchardCore.Localization.Data;
public sealed class CustomAdminNodeDataLocalizationProvider : AdminNodeDataLocalizationProvider
{
public CustomAdminNodeDataLocalizationProvider(IAdminMenuAccessor adminMenuAccessor)
: base(adminMenuAccessor)
{
}
public override async Task<IEnumerable<DataLocalizedString>> GetDescriptorsAsync()
{
var menus = await GetAdminMenusAsync();
return menus.SelectMany(menu => menu.MenuItems.OfType<CustomAdminNode>()
.Select(node => new DataLocalizedString(DataLocalizationContext.AdminMenu(menu.Name), node.LinkText, string.Empty)));
}
}
[RequireFeatures("OrchardCore.DataLocalization")]
public sealed class DataLocalizationStartup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<ILocalizationDataProvider, CustomAdminNodeDataLocalizationProvider>();
}
}
| Permission | Member | Description |
|---|---|---|
ManageAdminMenu | AdminMenuPermissions.ManageAdminMenu | Create, edit, and delete admin menus. Granted to Administrator and Editor by default. |
ViewAdminMenuAll | AdminMenuPermissions.ViewAdminMenuAll | See every admin menu. Implied by ManageAdminMenu. |
ViewAdminMenu_{MenuName} | Permissions.CreatePermissionForAdminMenu(name) | See one admin menu; assign per role on the Edit Role page. Implied by both permissions above. |
NavigationManager collects all INavigationProvider implementations for the admin menu.AdminMenu provider adds Tools → Admin Menus and calls AdminMenuNavigationProvidersCoordinator.IAdminNodeNavigationBuilder recursively.Navigation-admin, NavigationItem-admin, and NavigationItemLink-admin templates. Each permission is checked once, and children of an unauthorized item are removed with it.The standard navigation is organized into Content, Design, Search, Settings, Tools, and Access Control groups, opened according to the Navigation menu behavior admin setting (Focused or Persistent, see orchardcore-admin).
AppContext.SetSwitch("LegacyAdminMenuNavigation", true); the legacy layout was removed and the switch has no effect. NavigationHelper.UseLegacyFormat() and the AdminMenuSecurityPosition, AdminMenuAuditTrailPosition, AdminMenuWorkflowsPosition, and AdminMenuConfigurationPosition constants were removed.OrchardCore.AdminMenu.Permissions.ManageAdminMenu and .ViewAdminMenuAll were removed. In 3.x these obsolete members were swapped (each returned the other permission). Replace each with the member of the same name, AdminMenuPermissions.ManageAdminMenu and AdminMenuPermissions.ViewAdminMenuAll, not with what it used to return. Stored role claims are unchanged.nav-group, nav-group-items, current, button.nav-toggle).What SKILL.md sets; muted values are Claude Code's defaults
/orchardcore:orchardcore-admin-menufrom 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.Other plugins' skills for the same job