Agent skill
orchardcore-navigation
Skill for creating and managing navigation menus in Orchard Core. Covers menu creation, navigation providers, admin menus, breadcrumbs, and menu content types.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/orchardcore-navigation-crestapps-crestapps-agentskill
Metadata
Additional technical details for this skill
- author
- CrestApps Team
- version
- 1.0
SKILL.md
Orchard Core Navigation - Prompt Templates
Create Navigation and Menus
You are an Orchard Core expert. Generate navigation menus, admin menus, and menu items for Orchard Core.
Guidelines
- Enable
OrchardCore.MenuandOrchardCore.Navigationfor menu support. - Menus in Orchard Core are content items of type
Menu. - Menu items are nested content items within a menu (e.g.,
LinkMenuItem,ContentMenuItem). - Admin menus are defined through
INavigationProviderimplementations. - Use the
Positionproperty to control menu item ordering (lower numbers appear first). - Admin menu positions follow the pattern:
"1","1.1","1.2"for nested items. - Navigation providers must be registered as scoped services.
Enabling Navigation Features
{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.Menu",
"OrchardCore.Navigation",
"OrchardCore.AdminMenu"
],
"disable": []
}
]
}
Custom Admin Navigation Provider
using Microsoft.Extensions.Localization;
using OrchardCore.Navigation;
public sealed class AdminMenu : INavigationProvider
{
private readonly IStringLocalizer S;
public AdminMenu(IStringLocalizer<AdminMenu> localizer)
{
S = localizer;
}
public ValueTask BuildNavigationAsync(string name, NavigationBuilder builder)
{
if (!string.Equals(name, "admin", StringComparison.OrdinalIgnoreCase))
{
return ValueTask.CompletedTask;
}
builder
.Add(S["{{MenuGroupName}}"], NavigationConstants.AdminMenuSettingsPosition, settings => settings
.AddClass("{{icon-class}}")
.Id("{{menuId}}")
.Add(S["{{SubMenuName}}"], S["{{SubMenuName}}"].PrefixPosition(), item => item
.Action("Index", "Admin", new { area = "{{ModuleName}}" })
.Permission(Permissions.{{PermissionName}})
.LocalNav()
)
);
return ValueTask.CompletedTask;
}
}
Registering Navigation Provider
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<INavigationProvider, AdminMenu>();
}
}
Menu Recipe (Creating a Menu via Recipe)
{
"steps": [
{
"name": "Content",
"data": [
{
"ContentItemId": "main-menu",
"ContentType": "Menu",
"DisplayText": "Main Menu",
"Latest": true,
"Published": true,
"MenuPart": {},
"MenuItemsListPart": {
"MenuItems": [
{
"ContentType": "LinkMenuItem",
"ContentItemId": "menu-home",
"LinkMenuItemPart": {
"Name": "Home",
"Url": "~/"
}
},
{
"ContentType": "LinkMenuItem",
"ContentItemId": "menu-about",
"LinkMenuItemPart": {
"Name": "About",
"Url": "~/about"
}
},
{
"ContentType": "LinkMenuItem",
"ContentItemId": "menu-contact",
"LinkMenuItemPart": {
"Name": "Contact",
"Url": "~/contact"
}
}
]
}
}
]
}
]
}
Rendering Menu in Liquid Template
{% shape "Menu", alias: "main-menu" %}
Rendering Breadcrumbs
Enable OrchardCore.Menu for breadcrumb support:
{% zone "Breadcrumbs" %}
Content Menu Item
To add a content item as a menu item:
{
"ContentType": "ContentMenuItem",
"ContentItemId": "menu-blog",
"ContentMenuItemPart": {
"ContentItem": {
"ContentItemId": "{{BlogContentItemId}}"
}
}
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?