Provides guidance on building admin index views in Orchard Core 4.0 using the AdminList shape, covering List/Grid layouts, tag helpers, column configuration, row display drivers, actions, toolbar, search, and bulk operations.
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.
Read when SKILL.md points to them.
Every Orchard Core 4.0 admin page that lists items (content items, users, features, queries, workflows, layers, ...) renders them through the shared AdminList shape from OrchardCore.Admin. The shape renders the search bar, page actions, toolbar (item count, select-all, bulk actions), rows, empty message, pager, and page size selector in the layout the site (or the user) picks. Never hand-write a <ul class="list-group">, <table>, toolbar, or pager for an admin listing.
| Enum | Values | Description |
|---|---|---|
AdminListLayout | List (default), Grid | List renders each item's SummaryAdmin shape as a whole row. Grid renders the item's SummaryAdminGrid shape, one cell per declared AdminListColumn, on a CSS grid whose header always lines up; below 48rem of list width (container query) it stacks like a List row instead of scrolling. |
AdminListActionsLayout | Buttons (default), Menu | Buttons renders the Actions zone as buttons plus an "Actions" dropdown for ActionsMenu. Menu renders everything in one ellipsis dropdown (a btn-sm btn-outline-secondary toggle, not wrapped in a btn-group). |
Exactly these values exist; templates can restyle them but cannot register more layouts.
In the redesigned TheAdmin (4.0) both layouts render the list as a card with a toolbar in the admin scheme's primary color and, in the Grid layout, sentence case column headers (write column titles in sentence case: Content item ID, not Content Item Id). Nested dropdown actions such as Localizations expand inside the containing actions menu, opening a submenu keeps the menu open, and menus never open under the fixed top bar. On small screens the list filters and badges wrap instead of overflowing.
| Layer | Responsibility |
|---|---|
| Controller | Query raw items and assign an AdminListContext<TModel> with Source, Pager, and optional region shapes. Never build the list or row shapes. |
| View | Render <admin-list name="..." context="Model.List"> and declare the grid columns and presentation. |
| Row display driver | A DisplayDriver<TModel> returning shapes with a SummaryAdmin location (List) and a SummaryAdminGrid location (Grid). |
| Column provider | Optional IAdminListColumnsProvider adding or changing another list's columns. |
AdminList shape | Resolves the layout at display time, builds each row once with that layout's display type, and renders the whole listing. |
Do not add column or cell drivers, column metadata classes, or build both representations of a row.
| Situation | Do this |
|---|---|
| New admin page that lists items | Follow "Building a List Page" below. |
Controller already builds rows with BuildDisplayAsync(item, updater, "SummaryAdmin") and the view loops over them | Move the raw items into AdminListContext<TModel>.Source, delete the row building, add SummaryAdminGrid locations to the driver, render <admin-list>. |
Rows are hard-coded <li> markup in Razor | Write a DisplayDriver<TModel> for the row model first, so each row is a zone-holding shape, then build the page. |
| Adding a column to another module's list | Column provider plus a SummaryAdminGrid location in your driver (see "Extending Another Module's Columns"). |
| The page edits one entity | Not a list; see orchardcore-admin-edit-views. |
| The page arranges items rather than listing them (a tree, a canvas, a media library, widgets by zone) | Keep its own presentation. |
model.List = new AdminListContext<Announcement>
{
Source = announcements,
Pager = pagerShape,
};
The view model exposes public AdminListContext List { get; set; }. The generic argument selects the display model type (also for empty collections, and for a base class or interface display manager). Rows are built only while the view renders, after the layout is resolved, so driver queries and errors happen at render time.
Import the tag helpers once (for example in Views/_ViewImports.cshtml):
@using OrchardCore.Admin
@addTagHelper *, OrchardCore.Admin.Abstractions
The view keeps the form, its hidden inputs, and the action bar, and renders the list inside the form:
<form asp-action="Index" method="post" class="no-multisubmit" data-list-management data-selected-label="@T["selected"]">
@* Keep the hidden filter submit first: Enter in the search box triggers it. *@
<input type="submit" name="submit.Filter" id="submitFilter" class="visually-hidden" />
<input asp-for="Options.BulkAction" type="hidden" />
<input type="submit" name="submit.BulkAction" class="visually-hidden" />
@* Search input group and page buttons in a sticky action bar, see references/admin-lists-examples.md *@
<admin-list name="Announcements" context="Model.List"
bulk-actions="Model.Options.BulkActions"
empty-message="@T["<strong>Nothing here!</strong> There are no announcements yet."]">
<admin-list-list item-css-class="list-group-item" />
<admin-list-grid>
<admin-list-column type="Select" />
<admin-list-column name="Title" title="@T["Title"]" position="20" />
<admin-list-column name="Status" title="@T["Status"]" position="30" width="auto" no-wrap="true" />
<admin-list-column type="Actions" title="@T["Actions"]" />
</admin-list-grid>
</admin-list>
</form>
<script asp-name="list-management" at="Foot"></script>
name identifies the list for column providers, the user's layout choice, and alternates. Use a string literal when only the view uses it; keep a module constant (like ContentsAdminList.Name) only when code reuses it.name="submit.Filter" value="submit.Filter"), never an icon inside the input. The AdminListSearch shape renders exactly that. The button needs a value: [FormValueRequired("submit.Filter")] rejects an empty value, so a valueless button reloads the list unfiltered (only Enter, through the hidden input, filtered before the fix).bootstrap-select inside .admin-list (or with data-selected-text-format="static") keep their button color while nothing is selected, so every filter of a list looks alike.list-management script resource (from OrchardCore.Resources) wires every [data-list-management] root: the toolbar's #select-all, #items, #selected-items, and #actions elements, itemIds row checkboxes, bulk action .dropdown-item[data-action] links (confirmed through TheAdmin's confirmDialog when they carry data-message, as the generated toolbar's do), the hidden Options.BulkAction input, and submit.BulkAction. Override names with data-item-input-name, data-bulk-action-input-name, data-submit-bulk-action-name, and data-min-selected-items; add data-client-side-search="true" to filter rows by their data-filter-value attribute as the user types in #search-box, with an optional #list-alert element shown when nothing matches.Pair every location with a display type. The shape type and template are shared; only the zone differs:
public sealed class AnnouncementDisplayDriver : DisplayDriver<Announcement>
{
public override Task<IDisplayResult> DisplayAsync(Announcement announcement, BuildDisplayContext context)
{
// Row classes and attributes render on the row element in both layouts.
if (context.DisplayType is OrchardCoreConstants.DisplayType.SummaryAdmin or OrchardCoreConstants.DisplayType.SummaryAdminGrid
&& context.Shape is Shape row)
{
row.Attributes["data-filter-value"] = announcement.Title?.ToLowerInvariant() ?? string.Empty;
}
return CombineAsync(
View("Announcement_Checkbox_SummaryAdmin", announcement)
.Location(OrchardCoreConstants.DisplayType.SummaryAdmin, "Checkbox:1")
.Location(OrchardCoreConstants.DisplayType.SummaryAdminGrid, "Select:1"),
View("Announcement_Fields_SummaryAdmin", announcement)
.Location(OrchardCoreConstants.DisplayType.SummaryAdmin, "Content:1")
.Location(OrchardCoreConstants.DisplayType.SummaryAdminGrid, "Title:1"),
View("Announcement_Status_SummaryAdmin", announcement)
.Location(OrchardCoreConstants.DisplayType.SummaryAdmin, "Tags:5")
.Location(OrchardCoreConstants.DisplayType.SummaryAdminGrid, "Status:5"),
View("Announcement_Buttons_SummaryAdmin", announcement)
.Location(OrchardCoreConstants.DisplayType.SummaryAdmin, "Actions:5")
.Location(OrchardCoreConstants.DisplayType.SummaryAdminGrid, "Actions:5"));
}
}
Register it with services.AddDisplayDriver<Announcement, AnnouncementDisplayDriver>() in the feature that owns the list; a driver registered by a neighbouring feature leaves every row empty on sites where that feature is off. The row shape type is typeof(TModel).Name plus the display type (Announcement_SummaryAdmin), so drive a domain model or a dedicated entry record named what the shape should be called, not a *ViewModel.
.Location("Tags:5") lands in a Tags zone no column renders. Pair every SummaryAdmin location with a SummaryAdminGrid one, unless the zone name is also a column name (such as Actions).SummaryAdminGrid location. Display types do not inherit placement, whether it comes from a driver or placement.json.|Column groupings for cells; columns come from <admin-list-column>.The full controller, views, and templates are in references/admin-lists-examples.md.
<admin-list> requires name and context:
| Attribute | Purpose |
|---|---|
name | Stable list identity used by column providers, the user's layout cookie, and alternates. Not part of the context. |
context | The AdminListContext from the view model. |
bulk-actions | IList<SelectListItem> for the generic toolbar; each Value is the posted action name. |
empty-message | IHtmlContent shown when there are no rows (defaults to "No results found."). |
show-toolbar, show-select-all, show-layout-selector | Override the matching context flags. |
layout | Forces List or Grid. |
item-css-class | Row classes for the List layout (default list-group-item list-group-item-action). |
rows-* / rows-attributes | Attributes on the element wrapping the rows, e.g. rows-id="my-sortable-list". |
<admin-list-list> and <admin-list-grid> accept rows-class and item-css-class, may each be declared once, configure their layout without forcing it, and emit no HTML. For Grid, item-css-class adds to the required grid row class.
<admin-list-column> (inside admin-list or admin-list-grid):
| Attribute | Purpose |
|---|---|
type | Select (the Select zone at position 10) or Actions (Actions and ActionsMenu zones at position end, end-aligned). Omit for a regular column. |
name | Required for regular columns, unique ignoring case. Default zone and admin-list-column-{name} CSS class. |
title | Localized header text; also labels stacked cells. |
position | Placement syntax (10, 25, 35.5, end). Columns sort after all providers ran; unpositioned columns go last. |
width | Any CSS width (20%, 12rem) or auto to hug the content. Columns without a width share the remaining space, down to 8rem each (minmax(8rem, 1fr)), so titles do not break mid-word. |
alignment | Start (default), Center, End. |
no-wrap | Prevents wrapping, e.g. dates and badges. |
css-class | Extra classes on the header and cells. |
zones | Comma- or space-separated row zones to render instead of the zone named after the column. |
AdminListContext Properties| Property | Description |
|---|---|
Source, ItemType | Raw items; AdminListContext<TModel> sets ItemType and types Source. |
Pager, PageSize | Pager shape; a separately placed page size selector (set ShowPageSizeSelector = false on the pager to avoid rendering it twice). |
Header | Options editor shape whose Summary and Actions zones render above the rows (content items, users). |
Toolbar, ShowToolbar, ShowSelectAll, BulkActions, ToolbarActions | Supply a custom toolbar, or let the list build AdminListToolbar from the rows, pager, and bulk actions. |
Search, Actions | Search-bar shape (e.g. AdminListSearch with Name, Value, Placeholder, Id, SubmitName, Autofocus, and a Filters zone) and the page buttons the layout places at the top of the list, for example Actions = await _shapeFactory.CreateAsync("LayersCreateButton") rendering a btn btn-secondary create Add layer link. |
Layout, ShowLayoutSelector | Force a layout (e.g. while rows are drag-sorted) and hide the selector. |
Data | Values for column providers, e.g. ContentsAdminList.ContentTypesKey. |
RowsAttributes, ItemCssClass, ListOptions, GridOptions, EmptyMessage | Presentation. |
The default IAdminListItemDisplayManager<TModel> delegates to IDisplayManager<TModel>; register a closed implementation for a specialized pipeline (Contents uses one that calls IContentItemDisplayManager).
{Model}.SummaryAdmin.cshtml renders the zones for the List layout only (the grid renders column zones directly). Every shipped row uses the same structure so lists look alike:
<div class="row g-0 align-items-center">
<div class="col">
<div class="title d-flex align-items-center">
@* Checkbox zone, then <div class="summary d-flex flex-column flex-md-row list-item-search-text"> with Content, Tags, Meta *@
</div>
@if (Model.Description != null)
{
@await DisplayAsync(Model.Description)
}
</div>
<div class="col-auto d-flex justify-content-end ps-2">
@await DisplayAsync(await Factory.CreateAdminListActionsAsync((IShape)Model))
</div>
</div>
| Zone | Renders as | Never |
|---|---|---|
Content | The title, a plain link to the edit page | A heading (<h5>) |
Tags, Meta | One <span class="badge ta-badge fw-normal"> per fact, with a leading icon and a title tooltip (the users list puts the email badge and UserRolesMeta role badges here) | Plain text or <span class="hint"> |
Description | <div class="admin-list-secondary">, its own line under the title | A full-width row running under the actions |
Actions, ActionsMenu | Through CreateAdminListActionsAsync, so the Buttons/Menu setting applies; menu items are bare <a>/<button class="dropdown-item"> | A hand-written button group, or menu items wrapped in <li> |
Checkbox | A form-check whose label holds <span class="visually-hidden">@T["Select {0}", name]</span>, so screen readers name the checkbox | An empty label |
placement.json rules filtered by "displayType": "SummaryAdminGrid" move a shape to another column zone, hide it ("place": "-"), change its template, or add wrappers and alternates, independently of the List layout:{
"ContentCulture_SummaryAdmin": [
{ "displayType": "SummaryAdminGrid", "place": "Status:10" }
]
}
Content-BlogPost.SummaryAdmin.cshtml affect only List; customize grid cells with AdminListCell-{ListName}-{Column}.cshtml, which receives Row and Column. The grid only creates AdminListCell shapes for overridden cells (see CellRenderings).Widget.SummaryAdmin (Design → Widgets zones), MenuItem.Admin (menu editor), Content.TermAdmin (taxonomy editor) and MenuItem.TreeSummary (admin menu nodes: Edit and Delete in Actions, Enable or Disable in ActionsMenu) add their buttons to the Actions zone and render @await DisplayAsync(await Factory.CreateAdminListActionsAsync((IShape)Model)). A template can add markup to its own zone with await ((IShape)((IZoneHolding)Model).Zones["Actions"]).AddAsync(html).UserRolesMeta is placed in Meta for SummaryAdmin (it was Description) and in Roles for SummaryAdminGrid. UserDisplayName.SummaryAdminGrid renders a user (such as a content item's author) as the same badge in the Grid layout.ContentsTitle_SummaryAdmin and ContentsType_SummaryAdmin in the Title and Type zones.Actions and ActionsMenu zones through AdminListActions; moving an action shape to another zone removes it from that cell.Rows is output built during display (never an input) and DisplayType is the resolved row display type. Rows and regions inherit the list name and layout, so their alternates work without the page passing them.public sealed class CultureColumnsProvider : IAdminListColumnsProvider
{
private readonly IStringLocalizer S;
public CultureColumnsProvider(IStringLocalizer<CultureColumnsProvider> localizer)
{
S = localizer;
}
public Task PopulateAsync(AdminListColumnsContext context)
{
context.Columns.Add(new AdminListColumn
{
Name = "Culture",
Position = "25",
Title = S["Culture"],
Width = AdminListColumn.AutoWidth,
});
return Task.CompletedTask;
}
}
services.AddAdminListColumnsProvider<CultureColumnsProvider>(ContentsAdminList.Name);
services.AddAdminListColumnsProvider<SiteColumnsProvider>(); // global, every list
AdminListColumnsProviderKey); list names are case-sensitive and only matching providers are constructed. Duplicate registrations are ignored.context.ListName, context.Find(name), context.Remove(name), context.Data, TryGetData<T>(), and GetData<T>() are available. Global providers must check Find before changing optional columns.SummaryAdminGrid.AdminListColumns.Select() and AdminListColumns.Actions(S["Actions"]) create the shared first and last columns in C#.Published list names include ContentsAdminList.Name (Contents) and UsersAdminList.Name (Users); others are literal, e.g. Features, Queries, Layers, Tenants, WorkflowTypes, AdminMenus, AuditTrail, Roles, Templates. The Contents list passes ContentsAdminList.ContentTypesKey and ContentsAdminList.StereotypesKey in Data.
Shipped defaults come from AdminListOptions, bound per tenant from OrchardCore:Admin:List:
{
"OrchardCore": {
"Admin": {
"List": {
"DefaultLayout": "Grid",
"DefaultActionsLayout": "Menu",
"AllowUserSelection": true
}
}
}
}
Settings → Admin overrides them with List layout (in the Lists card), Actions layout (in the Appearance card; each with Use configuration default; the actions layout also drives the edit page action bar, see orchardcore-admin-edit-views), and Let users choose the layout of a list, stored on AdminSettings:
{
"steps": [
{
"name": "settings",
"AdminSettings": {
"ListLayout": "Grid",
"ActionsLayout": "Menu",
"AllowUserListLayoutSelection": true
}
}
]
}
AdminListOptions participates in the signal-backed refresh pipeline: read it through IOptionsMonitor<AdminListOptions>.CurrentValue; saving the settings applies without a shell release.
Let users choose the layout of a list is on by default (AdminSettings.AllowUserListLayoutSelection = true); the site setting is copied over AdminListOptions.AllowUserSelection, so turn it off in Settings → Admin to make every list use the site layout. With user selection on, each list shows a List/Grid selector; a click reloads with ?layout=Grid and stores the choice in a per-list cookie. Resolution order is AdminListContext.Layout, then ?layout=, then the cookie, then the site setting, then AdminListOptions.DefaultLayout. Invalid values are ignored. A list without columns falls back to List and shows no selector. A page rendering several lists (grouped by category) sets ShowLayoutSelector = false on each and creates one selector shape:
model.LayoutSelector = await shapeFactory.CreateAsync(AdminListConstants.LayoutSelectorShapeType, Arguments.From(new
{
ListName = "Features",
}));
| Shape | Alternates (least to most specific) |
|---|---|
AdminList | AdminList__{Layout}, AdminList__{Name}, AdminList__{Name}__{Layout} |
AdminListCell | AdminListCell__{Column}, AdminListCell__{Name}__{Column} |
AdminListActions | AdminListActions__{Layout}, AdminListActions__{Name}, AdminListActions__{Name}__{Layout} (layout is Buttons or Menu) |
AdminListToolbar | AdminListToolbar__{Layout}, AdminListToolbar__{Name}, AdminListToolbar__{Name}__{Layout} |
AdminListSearch | AdminListSearch__{Layout}, AdminListSearch__{Name}, AdminListSearch__{Name}__{Layout} |
Examples are AdminList-Contents-Grid.cshtml and AdminListActions-Menu.cshtml. A name-only alternate such as AdminList-Users.cshtml applies to every layout of that list (opting it out of the setting); name the layout to change one mode. The list stamps ListName and ListLayout on its toolbar, search, pager, page size selector, and rows, so alternates resolve without the page passing them.
Mark the rows container with rows-* attributes (e.g. rows-id="rewrite-rules-sortable-list") and drag the rows, not their container: in Grid the container is display: contents. Use SortableJS oldDraggableIndex/newDraggableIndex, which count only rows. Force Layout = AdminListLayout.List only when the page cannot render a grid while sorting.
Items: Shape already exposes Items (its child shapes).SummaryAdminGrid location for that column's zone.List: change the grid with SummaryAdminGrid placement or AdminListCell-{List}-{Column}.cshtml.ActionsMenu items in <li>: the dropdown sits inside the row's <li> in the List layout, the HTML parser hoists the nested <li> out, and the menu renders empty with stray links under the list.d-md-none in row Razor: the grid stacks through a container query on the list itself, because the admin sidebar makes the viewport a poor proxy for the list width.AdminList displaying event, so driver queries and exceptions surface at render time, not in the controller.UsersAdminListFilters) renders one <div class="btn-group filter"> of selectpicker selects, without an extra wrapper, so the toolbar strip (div.admin-list-toolbar-strip) can wrap the filters and move the count under them on small screens.Check every list page in both layouts and both actions layouts (Buttons and Menu), with rows and with none (empty message), and in a narrow window where the grid stacks its cells. In the Grid layout every declared column should render something on every row. Keep Let users choose the layout of a list on (the default) while developing to switch quickly.
Views/Admin/Index.cshtml) is a breaking change: an override that writes its own <ul class="list-group"> keeps the old look and ignores the selected layout. Render the view model's List context with <admin-list> and declare columns with <admin-list-column>.BuildDisplayAsync(item, updater, "SummaryAdmin")) and views looped over them. Now controllers assign raw records to AdminListContext<TModel>.Source and the list builds rows.ListContentsViewModel.ContentItems, Users, Queries, ...) now hold raw records, not row shapes or model/shape pairs; custom templates reading them must adapt. ContentsAdminList.cshtml renders through ListContentsViewModel.List.SummaryAdminGrid locations to existing row drivers, or their content is missing from the grid.AdminSettings.ListActionsLayout (4.0 previews) is now AdminSettings.ActionsLayout, labelled Actions layout (in the Appearance card of Settings → Admin), and also controls the edit page action bar. Update recipes and tests; the old stored value is not migrated.Event, Category, Details, and Actions columns; AuditTrailEventTags_SummaryAdmin was replaced by AuditTrailEventName_SummaryAdmin (EventName zone) and AuditTrailEventCategory_SummaryAdmin (EventCategory zone).orchardcore-admin for admin controllers, routes, and settings pages.orchardcore-admin-edit-views for the create and edit pages a list links to.orchardcore-breadcrumbs for the page title trail; reuse the list name as the trail name.orchardcore-navigation for pager shapes and page size selection.orchardcore-contents-admin-list-filters and orchardcore-users-admin-list-filters for list filters.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, admin-list, admin-index, list-layout, grid-layout, tag-helpers
/orchardcore:orchardcore-admin-listsfrom 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