Agent skill
orchardcore-placement
Skill for configuring shape placement in Orchard Core. Covers placement.json files, IShapePlacementProvider, shape alternates, wrappers, and zone/position configuration.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/orchardcore-placement
Metadata
Additional technical details for this skill
- author
- CrestApps Team
- version
- 1.0
SKILL.md
Orchard Core Placement - Prompt Templates
Configure Shape Placement
You are an Orchard Core expert. Generate placement configuration for Orchard Core shapes.
Guidelines
- Placement controls where and how shapes are rendered in the layout.
placement.jsonis the standard way to configure placement in a module or theme.- Each entry maps a shape type to a zone and position.
- Placement can be scoped by content type, display type, and differentiator.
- The
placeproperty sets the zone and position (e.g.,"Content:5"). alternatesadds alternative templates for a shape.wrapperswraps a shape with additional markup.- Custom
IShapePlacementProvidercan provide dynamic placement. - Always seal classes.
Basic placement.json
{
"TextField_Edit": [
{
"place": "Content:2"
}
],
"{{PartName}}": [
{
"place": "Content:5",
"alternates": ["{{PartName}}_Summary__{{ContentType}}"]
}
],
"{{PartName}}_Edit": [
{
"place": "Content:5"
}
]
}
Placement Scoped by Content Type
{
"{{PartName}}": [
{
"contentType": ["BlogPost"],
"place": "Content:after"
},
{
"contentType": ["Article"],
"place": "Sidebar:5"
}
]
}
Placement Scoped by Display Type
{
"{{PartName}}": [
{
"displayType": "Detail",
"place": "Content:5"
},
{
"displayType": "Summary",
"place": "Meta:5"
},
{
"displayType": "SummaryAdmin",
"place": "Actions:5"
}
]
}
Hiding a Shape
{
"{{PartName}}": [
{
"place": "-"
}
]
}
Using Alternates
{
"{{PartName}}": [
{
"contentType": ["BlogPost"],
"displayType": "Detail",
"alternates": ["{{PartName}}__BlogPost"]
}
]
}
Using Wrappers
{
"{{PartName}}": [
{
"place": "Content:5",
"wrappers": ["{{PartName}}_Wrapper"]
}
]
}
Placement with Differentiator
{
"TextField": [
{
"differentiator": "BlogPost-Subtitle",
"place": "Content:2"
},
{
"differentiator": "BlogPost-Author",
"place": "Meta:1"
}
]
}
Custom Shape Placement Provider
using OrchardCore.DisplayManagement.Descriptors.ShapePlacementStrategy;
public sealed class {{ProviderName}}PlacementProvider : IShapePlacementProvider
{
public Task<IPlacementInfoResolver> BuildPlacementInfoResolverAsync(IBuildShapeContext context)
{
return Task.FromResult<IPlacementInfoResolver>(new PlacementInfoResolver(context));
}
private sealed class PlacementInfoResolver : IPlacementInfoResolver
{
private readonly IBuildShapeContext _context;
public PlacementInfoResolver(IBuildShapeContext context)
{
_context = context;
}
public PlacementInfo ResolvePlacement(ShapePlacementContext placementContext)
{
if (placementContext.ShapeType == "{{ShapeType}}")
{
return new PlacementInfo
{
Location = "Content:5",
};
}
return null;
}
}
}
Registering Custom Placement Provider
using OrchardCore.DisplayManagement.Descriptors.ShapePlacementStrategy;
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IShapePlacementProvider, {{ProviderName}}PlacementProvider>();
}
}
Placement Zones Reference
Common zones in Orchard Core themes:
Header— Top of the page.Navigation— Main navigation area.Content— Primary content area.Content:before— Before the content.Content:after— After the content.Sidebar— Sidebar area.Footer— Bottom of the page.Meta— Metadata area (dates, author, etc.).Tags— Tags area.Actions— Action buttons (edit, delete, etc.).
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?