Extends the ABP application shell across MVC and Blazor with layout hooks, global toolbars, page header, and branding customization without copying the theme layout.
Ships in abp-ui. 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.
Guidance for extending the ABP application shell — the layout, toolbar, page header, and branding — across ASP.NET Core MVC / Razor Pages and Blazor. The point of this skill is that ABP ships the layout inside the theme NuGet packages, so the shell has documented extension points that are not derivable from plain ASP.NET Core or Blazor.
<head> tags) into every page via layout hooks.ABP's theming system places the page layout into the theme NuGet packages. The final application does not contain a Layout.cshtml (MVC) or MainLayout.razor (Blazor). You can copy the theme code into your solution and edit it freely — but then you lose automatic theme updates when you upgrade the theme package. The supported way to add content to the layout is the Layout Hook System, which lets you inject a component at defined hook points that every theme's layout implements.
Register hooks in your module's ConfigureServices via AbpLayoutHookOptions and the LayoutHooks constants. The component type differs by stack:
AbpViewComponent).MVC — add a ViewComponent at the last position of the <head>:
Configure<AbpLayoutHookOptions>(options =>
{
options.Add(
LayoutHooks.Head.Last, // the hook point
typeof(GoogleAnalyticsViewComponent) // the component to add
);
});
Blazor — add a Razor Component at the end of the <body>:
Configure<AbpLayoutHookOptions>(options =>
{
options.Add(
LayoutHooks.Body.Last,
typeof(AnnouncementComponent)
);
});
LayoutHooks.Head.First, LayoutHooks.Head.Last, LayoutHooks.Body.First, LayoutHooks.Body.Last, plus LayoutHooks.PageContent.First and LayoutHooks.PageContent.Last (just before/after @RenderBody()).LayoutHooks.Head.First, LayoutHooks.Head.Last, LayoutHooks.Body.First, LayoutHooks.Body.Last (no PageContent.*).By default a hook is added to all layouts. Pass layout: to target one, using the StandardLayouts constants:
options.Add(LayoutHooks.Head.Last, typeof(GoogleAnalyticsViewComponent),
layout: StandardLayouts.Application);
MVC defines four standard layouts on StandardLayouts: Application (main/default — header, menu, footer, toolbar), Account (login/register pages under /Pages/Account), Public (public-facing pages), and Empty. Blazor defines Application, Account, Public, and Empty. If you don't specify a layout, the component renders in all layouts.
You (or the modules you use) can add multiple items to the same hook point; all of them render in the order they were added. This is why hooks (not layout copies) are the right extension point — several modules can extend the shell at once without conflicting.
<head> hooks need a LayoutHook in App.razorBlazor's App.razor is the entry point. To make LayoutHooks.Head.* actually render, you must place the <LayoutHook> component manually inside the <head> of App.razor:
@using Volo.Abp.AspNetCore.Components.Web.Theming.Components.LayoutHooks;
@using Volo.Abp.Ui.LayoutHooks;
@using Volo.Abp.AspNetCore.Components.Web.Theming.Layout;
<head>
<LayoutHook Name="@LayoutHooks.Head.First" Layout="@StandardLayouts.Application" />
<!-- your head content -->
<LayoutHook Name="@LayoutHooks.Head.Last" Layout="@StandardLayouts.Application" />
</head>
After registering these, the components you added to those hook points render in place. (Body hooks work without this step.)
These are two different mechanisms — don't confuse them.
StandardToolbars.Main)There is one standard toolbar named "Main", the StandardToolbars.Main constant. Modules and your app add items to it, and the theme renders it on the layout. To contribute an item globally, implement IToolbarContributor. As with hooks, the item is a ViewComponent in MVC and a Razor Component in Blazor:
public class MyToolbarContributor : IToolbarContributor
{
public Task ConfigureToolbarAsync(IToolbarConfigurationContext context)
{
if (context.Toolbar.Name == StandardToolbars.Main)
{
context.Toolbar.Items.Insert(0, new ToolbarItem(typeof(NotificationViewComponent)));
}
return Task.CompletedTask;
}
}
Register the contributor via AbpToolbarOptions:
Configure<AbpToolbarOptions>(options =>
{
options.Contributors.Add(new MyToolbarContributor());
});
Gate items by permission with context.IsGrantedAsync("MyPermissionName"), or the RequirePermissions("MyPermissionName") extension on a ToolbarItem (more performant — ABP batches the checks). IToolbarManager returns items by toolbar name and is used by themes to render the toolbar; you rarely call it directly.
A theme may define its own desktop/mobile toolbar constants (e.g. the LeptonX Lite theme's
LeptonXLiteToolbars.Main/LeptonXLiteToolbars.MainMobile). Checkcontext.Toolbar.Nameagainst the one your theme uses.
PageHeader)A page's own toolbar is unrelated to the global Main toolbar. In Blazor, set it on the PageHeader component with a PageToolbar and its AddButton extension (see Page Header below).
IPageLayoutInject IPageLayout into any page/view to set header properties; the theme renders them:
@inject IPageLayout PageLayout
@{
PageLayout.Content.Title = "Book List";
PageLayout.Content.BreadCrumb.Add("Language Management");
PageLayout.Content.MenuItemName = "BookStore.Books";
}
Content.Title also feeds the HTML <title> (alongside the brand name).Content.BreadCrumb.Add(text, url?, icon?); toggle BreadCrumb.ShowHome / BreadCrumb.ShowCurrent.Content.MenuItemName must match a menu item name from the navigation system so the theme marks it active.PageHeader componentAdd the PageHeader component to a page and drive it with parameters. The namespace differs by UI library: Volo.Abp.AspNetCore.Components.Web.Theming.Layout (Blazorise) or Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Layout (MudBlazor).
<PageHeader Title="Book List"
BreadcrumbItems="@BreadcrumbItems"
Toolbar="@Toolbar" />
protected List<BreadcrumbItem> BreadcrumbItems { get; } = new();
protected PageToolbar Toolbar { get; } = new();
protected override void OnInitialized()
{
BreadcrumbItems.Add(new BreadcrumbItem("Language Management"));
Toolbar.AddButton("New Item", () => Task.CompletedTask, icon: /* IconName.Add or MudBlazor.Icons.Material.Filled.Add */);
}
Volo.Abp.BlazoriseUI.BreadcrumbItem (Blazorise) or MudBlazor.BreadcrumbItem (MudBlazor) — they are different types with different constructors.BreadcrumbShowHome / BreadcrumbShowCurrent parameters.PageHeaderOptions (RenderPageTitle, RenderBreadcrumbs, RenderToolbar — all true by default).The Basic theme doesn't render breadcrumbs or (MVC) the selected menu item; LeptonX / LeptonX Lite do.
Both stacks use IBrandingProvider (namespace Volo.Abp.Ui.Branding) for the app name and logo. Implement the interface or inherit DefaultBrandingProvider, and register it as a replacement service:
[Dependency(ReplaceServices = true)]
public class MyProjectBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "Book Store";
public override string? LogoUrl => "/logo.png";
public override string? LogoReverseUrl => "/logo-reverse.png";
}
IBrandingProvider exposes AppName, LogoUrl, and LogoReverseUrl (logo for a reverse/dark theme). It's evaluated on every page refresh, so a multi-tenant app can return a tenant-specific name/logo.
LayoutHooks.Body.* renders without extra wiring; a LayoutHooks.Head.* hook in Blazor renders only after a matching <LayoutHook> is present in App.razor.StandardToolbars.Main contributor's item shows in the shell toolbar; permission-gated items appear only when the permission is granted.IPageLayout (MVC) / PageHeader (Blazor) update the title/breadcrumb — verify against a theme that renders them (LeptonX), since the Basic theme skips breadcrumbs.IBrandingProvider override changes the app name/logo shown in the shell after replacing the service.AbpLayoutHookOptions + LayoutHooks instead.<head> hook does nothing — you registered a LayoutHooks.Head.* component but didn't add the <LayoutHook Name="..." Layout="..." /> to App.razor's <head>.StandardToolbars.Main + IToolbarContributor is the global shell toolbar; a page's own buttons go on the Blazor PageHeader's PageToolbar. They are unrelated.PageContent.* hooks exist in Blazor — those hook points are MVC-only; Blazor has Head.* and Body.* only.Volo.Abp.BlazoriseUI.BreadcrumbItem and MudBlazor.BreadcrumbItem are distinct; use the one matching the project's UI library and PageHeader namespace.[Dependency(ReplaceServices = true)] on the branding provider — without it, DefaultBrandingProvider stays in effect.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
abp-framework, layout-hooks, toolbar, page-header, branding, application-shell
9 skills in this plugin
/angular-uiBuild and debug ABP Angular UI — generated proxy services, routing/menu contribution, replaceable components, config/permission checks, and localization. USE FOR: calling app services through generated proxy services, adding routes/menu items with RoutesService, swapping components with ReplaceableComponentsService, reading config with ConfigStateService, checking permissions with PermissionService / *abpPermission, localizing with LocalizationService / the abpLocalization pipe. DO NOT USE FOR: generating or regenerating Angular service/model proxies with the NX-vs-plain generator (use abp-cli-commands), Blazor UI (use blazor-ui), MVC / Razor Pages UI (use mvc-razor-ui), defining localization resources and translating json (use menus-and-localization), backend permission definitions (use permissions-and-authorization).
/blazor-uiBuild and debug ABP Blazor UI — pages/components, base classes, render/hosting models, theming, and the Blazorise vs MudBlazor choice. USE FOR: creating Blazor pages/components, choosing a base class (AbpComponentBase / AbpCrudPageBase), calling application services from Blazor, picking a hosting/render model (Server / WebAssembly / WebApp / Auto), working with the LeptonX/Basic theme, deciding between Blazorise and MudBlazor components. DO NOT USE FOR: Angular UI (use angular-ui), MVC / Razor Pages UI (use mvc-razor-ui), menu contribution and localization resources/json (use menus-and-localization), permission definitions on the backend (use permissions-and-authorization).
/abp-ui:extend-application-shellfrom abp-ui
npx claudepluginhub abpframework/abp-skills --plugin abp-uiOther plugins' skills for the same job