orchardcore-module-creator

OrchardCore Module Creator

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "orchardcore-module-creator" with this command: npx skills add orchardcms/orchardcore/orchardcms-orchardcore-orchardcore-module-creator

OrchardCore Module Creator

This skill guides you through creating new OrchardCore modules following project conventions.

Prerequisites

  • OrchardCore repository at D:\orchardcore

  • .NET SDK 10.0+ installed

Module Creation Workflow

Step 1: Determine Module Type

What kind of module are you creating?

Type Description Key Components

Content Part Adds data/behavior to content items Part, Driver, Views

Content Field Custom field type Field, Driver, Views

Settings Site-wide configuration SiteSettings, Driver

Admin Feature Admin pages/tools Controller, Views, Menu

API REST endpoints ApiController

Background Task Scheduled jobs IBackgroundTask

Step 2: Create Module Directory

Create module folder

mkdir src/OrchardCore.Modules/OrchardCore.YourModule cd src/OrchardCore.Modules/OrchardCore.YourModule

Step 3: Create Required Files

Every module needs these three files:

  • Manifest.cs - Module metadata

  • Startup.cs - Service registration

  • OrchardCore.YourModule.csproj - Project file

See references/module-structure.md for templates.

Step 4: Add Components Based on Type

For Content Part modules:

Models/YourPart.cs ViewModels/YourPartViewModel.cs Drivers/YourPartDisplayDriver.cs Views/YourPart.cshtml Views/YourPart_Edit.cshtml

For Admin modules:

Controllers/AdminController.cs Views/Admin/Index.cshtml AdminMenu.cs PermissionProvider.cs

For Data-storing modules:

Migrations.cs Indexes/YourIndex.cs

See references/patterns.md for code templates.

Step 5: Register in Startup.cs

public override void ConfigureServices(IServiceCollection services) { // Content part services.AddContentPart<YourPart>() .UseDisplayDriver<YourPartDisplayDriver>();

// Services
services.AddScoped&#x3C;IYourService, YourService>();

// Migrations (if storing data)
services.AddDataMigration&#x3C;Migrations>();

// Permissions (if securing features)
services.AddPermissionProvider&#x3C;PermissionProvider>();

// Navigation (if adding admin menu)
services.AddNavigationProvider&#x3C;AdminMenu>();

}

Step 6: Build and Test

Build the module

cd D:\orchardcore dotnet build src/OrchardCore.Modules/OrchardCore.YourModule

Run the application

cd src/OrchardCore.Cms.Web dotnet run -f net10.0

Enable the feature in Admin → Features

Quick Reference

Naming Conventions

Item Convention Example

Module folder OrchardCore.ModuleName

OrchardCore.Rating

Namespace OrchardCore.ModuleName

OrchardCore.Rating

Feature ID OrchardCore.ModuleName

OrchardCore.Rating

Content Part NamePart

RatingPart

Driver NamePartDisplayDriver

RatingPartDisplayDriver

View PartName.cshtml

RatingPart.cshtml

Edit View PartName_Edit.cshtml

RatingPart_Edit.cshtml

Common Dependencies

Add to .csproj as needed:

<!-- Core module support --> <ProjectReference Include="....\OrchardCore\OrchardCore.Module.Targets\OrchardCore.Module.Targets.csproj" />

<!-- Content management --> <ProjectReference Include="....\OrchardCore\OrchardCore.ContentManagement\OrchardCore.ContentManagement.csproj" />

<!-- Admin UI --> <ProjectReference Include="....\OrchardCore\OrchardCore.Admin\OrchardCore.Admin.csproj" />

Feature Categories

Use in Manifest.cs :

  • Content Management

  • Content

  • Navigation

  • Security

  • Infrastructure

  • Theming

  • Developer

References

  • references/module-structure.md

  • Directory layout and file templates

  • references/patterns.md

  • Code patterns (parts, drivers, handlers, etc.)

  • references/examples.md

  • Complete module examples

  • AGENTS.md (repo root) - Coding conventions and build commands

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

orchardcore-tester

No summary provided by upstream source.

Repository SourceNeeds Review
General

orchardcore-theme-creator

No summary provided by upstream source.

Repository SourceNeeds Review
General

Speech Writer

演讲稿(TED风格)、婚礼致辞、商务演讲、励志演讲、祝酒词、演讲大纲。Speech writing for TED-style talks, wedding speeches, business presentations, motivational speeches, toasts, and outlines....

Registry SourceRecently Updated
General

Study Plan

学习计划生成器。考研计划、考证规划、每日学习、番茄钟。Study plan generator for exams, certifications, daily schedules. 学习计划、考研计划、备考规划。Use when creating study schedules.

Registry SourceRecently Updated