Tags: web-dev reference

Reference - Umbraco

Language: Umbraco 17 LTS (.NET 10) · latest release 18.3, STS, also .NET 10
Checked: 2026-10-30


An ASP.NET Core app you own, with a CMS bolted into it. Editors build a content tree in the backoffice; it lands in a SQL database; your code reads it as strongly typed C# models and renders it with Razor, or Umbraco serves the same tree as JSON for a headless front end. Learn the content model (document types, element types, data types) and the request path (URL → content → template → view), and the rest is vocabulary.


§0 The one idea

Umbraco is a NuGet package inside your ASP.NET Core project, not a product you deploy code into. You run dotnet new umbraco, get a normal Program.cs, and the CMS (backoffice, database schema, routing, published cache) is added in a few builder calls. Then you write views and controllers the way you would in any ASP.NET Core MVC app.

YOUR APP                    Razor views · controllers · services
──────────────────────────────────────────────────────────────────
UMBRACO                     backoffice (editors) · content model
                            content routing · published cache
                            ModelsBuilder · Delivery API
──────────────────────────────────────────────────────────────────
ASP.NET Core                DI · middleware · MVC/Razor · config
──────────────────────────────────────────────────────────────────
.NET runtime + SQL Server / SQLite

Everything under the Umbraco line (DI, i.e. dependency injection, middleware, Razor) is Reference - ASP.NET Core and Reference - C Sharp. This note covers the Umbraco line only.

vs a SaaS headless CMS (Contentful): Contentful hosts the database, the editor UI and the API, and you only consume JSON. In Umbraco you host all three: it’s your process, your database, your deploy. You get to run code in the CMS (custom routing, event hooks, server-rendered pages) and you also pick up the upgrades, the hosting and the schema migrations.

vs WordPress: same overall shape (editors, a content DB, themes that render it), with three differences:

  • typed, not loose: the schema is document types defined up front, and ModelsBuilder turns them into C# classes, rather than a post plus untyped meta fields
  • compiled: the app is built and deployed as a .NET app. No uploading plugins in production
  • the developer owns the code: no theme-marketplace culture. Sites are built bespoke, typically by agencies

Generalises to .NET CMSs generally: Optimizely CMS and Sitecore have the same three layers (a typed content model defined by developers, a tree edited by authors, a rendering layer reading typed models), with different names. See The comparison set below.


The content model

The part to understand before any code. Every CMS has a version of this; Umbraco’s names are below.

DATA TYPE            a configured property editor
  "Textstring"         = Umbraco.TextBox, no config
  "Hero image"         = Media Picker, max 1, images only
  "Page blocks"        = Block List, allowed blocks: [hero, quote]
        │ used by
        ▼
DOCUMENT TYPE        a schema for a routable page in the tree
  alias  homePage
  props  title (Textstring) · heroImage (Hero image) · blocks (Page blocks)
  compositions  [seoMeta]           ← mixin, properties merged in
  allowed templates  [HomePage]     ← optional
  allowed children   [contentPage]
        │ instance of
        ▼
CONTENT NODE         an editor's page in the tree, with values

ELEMENT TYPE         a document type with no URL and no node
  alias  heroBlock   ← used as the schema for a block, or an Element (v18+)

TEMPLATE             a Razor .cshtml file assigned to a doc type

Terms, each once:

  • Property editor: the UI and storage logic for one kind of field (textbox, rich text, media picker, block list). Built-in or custom
  • Data type: a property editor plus its configuration, given a name. Reused across document types. Changing a data type’s config changes every property using it
  • Document type: the schema for content nodes. Has an alias (camelCase, homePage), which is the key in code and in JSON
  • Composition: a document type mixed into another so its properties appear on it. The way to share seoMeta across every page type. From v14 compositions are the only way to share properties. The older nested parent/child document type inheritance can’t be created any more, though migrated sites may still have it
  • Element type: a document type flagged as an element: no URL, no tree node. The schema for a block in a block editor, and from v18 for a reusable Element in the Library section
  • Template: a Razor view tied to a document type. Optional (see the required-vs-optional table)

Three trees, not one:

Content   documents — pages, routable, culture-variant
Media     images, files — media types, same model as doc types
Members   front-end users — member types, same model again
Library   Elements, shared reusable content          (v18+)
Users     backoffice editors — NOT members

Members are site visitors who log in. Users are editors. They’re separate tables, separate auth and separate APIs. Mixing up the two words is the commonest confusion in Umbraco conversations.

The pattern that generalises: developers own the schema (doc types, data types), editors own the instances (content). That split is behind every deployment problem in “Where it bites”, in every CMS. See Content Modelling.


The request lifecycle

A front-end request, coupled (Razor) mode:

GET /products/blue-widget/
   ↓
ASP.NET Core middleware        (yours, then Umbraco's)
   ↓
Umbraco route transformer      not a route table — a lookup
   ↓
domains + culture              which root node, which language?
   ↓
CONTENT FINDERS                URL → published content node
   by URL path, by id, …       none match → 404 → last-chance finder
   ↓  reads the PUBLISHED CACHE, never the DB tables directly
template selection             ?altTemplate= if allowed, else the node's template
   ↓
controller selection           ProductPageController exists?  → hijack
                               otherwise RenderController.Index
   ↓
CurrentTemplate(model)         ModelsBuilder model passed to the view
   ↓
Razor view → HTML

vs Next.js / most frameworks: no route file for pages. Like AEM’s Sling, the content tree is the route table. An editor creates /products/blue-widget by creating a node, with no deploy. A node with no template in a Razor site falls through to 404 unless a controller hijacks it. See Routing and Resolution.

The published cache

Draft and published content both live in the database. Front-end reads go through a published cache, so a page render doesn’t query the content tables.

v8–v14   NuCache — whole published tree loaded into memory at startup,
         serialised copy in the cmsContentNu table
v15+     Microsoft HybridCache — items loaded LAZILY on first request,
         L0 in-process memory cache, cmsContentNu as the database layer.
         Optional "seeding" pre-loads chosen doc types at startup

What changed in v15, in practice:

  • startup is faster on big sites, since the tree isn’t loaded up front
  • the first hit on a cold item is slower. Cache seeding (Umbraco:CMS:Cache:ContentTypeKeys, breadth-first seed counts) fixes the important pages
  • IPublishedSnapshot was removed, and code inject IPublishedContentCache instead. ModelsBuilder models had to be regenerated
  • navigation (parent/children) moved into a separate in-memory structure (IDocumentNavigationQueryService), since nodes no longer hold their whole subtree [CHECK: confirm navigation service landed in v15 alongside HybridCache]

Load-balanced sites need cache invalidation between servers. Umbraco pushes “content X changed” through its distributed cache (DistributedCache, ICacheRefresher) so every node evicts. Generic version: Caching Strategies.

The published cache sits in front of the database, not in front of the browser. Full-page HTML caching is separate and opt-in: website output caching, Umbraco:CMS:Website:OutputCache:Enabled, off by default [CHECK: version it was introduced]. Edge caching is your CDN’s job: HTTP Caching, CDN Caching.


1. The smallest working site

dotnet new install Umbraco.Templates
dotnet new umbraco --name MySite --development-database-type SQLite
cd MySite
dotnet run

Complete. Browse to the URL it prints, fill in the installer (admin user, database), and you have a running backoffice at /umbraco. No content yet, so the front end shows a “no published content” page.

The Program.cs it generates (v18; v17 is the same shape):

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
 
builder.CreateUmbracoBuilder()   // ← Umbraco's extension on the builder
    .AddBackOffice()             // editors' UI + Management API
    .AddWebsite()                // front-end routing + Razor rendering
    .AddComposers()              // run every IComposer in your code
    .Build();
 
WebApplication app = builder.Build();
 
await app.BootUmbracoAsync();    // DB check, migrations, cache
 
app.UseUmbraco()
    .WithMiddleware(u =>
    {
        u.UseBackOffice();
        u.UseWebsite();
    })
    .WithEndpoints(u =>
    {
        u.UseBackOfficeEndpoints();
        u.UseWebsiteEndpoints();
    });
 
await app.RunAsync();

What it adds to plain ASP.NET Core: CreateUmbracoBuilder() wraps the normal service registration, and UseUmbraco() wraps the middleware and endpoints. Everything else in this file is ordinary Reference - ASP.NET Core.

Template flags worth knowing (dotnet new umbraco -h lists all):

FlagDoes
-r LTSLatest long-term-support release (17) instead of latest (18)
-daEnable the Delivery API (headless)
--development-database-type SQLiteEmbedded DB for local dev
-dm IDEDevelopmentSourceCodeAuto models in dev, Nothing in prod, HTTPS on. The setup for a team with a build pipeline
-mm <mode>ModelsBuilder mode explicitly. See rung 3
--add-dockerAdds a Dockerfile

The database holds everything editors make, schema included: document types, data types and content all live in SQL, not files. Templates are .cshtml files on disk. Rung 10 is about this split.


2. Document types and properties

Created in the backoffice: Settings → Document Types → Create. No code. One with a template:

Document Type: Home Page
  alias        homePage
  icon         icon-home
  allow at root  ✓
  template     HomePage (created alongside)

  Tab "Content"
    Title        title        Textstring
    Intro        intro        Textarea
    Hero image   heroImage    Media Picker

Save it, then Content → Create → Home Page, fill in the fields, Save and Publish. / now routes to it.

The alias is the contract. title is the key in the database, in Model.Value("title"), in the generated .Title property and in the Delivery API JSON. Renaming an alias breaks every reference to it, and no compiler catches the string ones.


3. Templates, @Model and ModelsBuilder

The template created in step 2, at Views/HomePage.cshtml. Untyped first:

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
    Layout = null;
}
<h1>@Model.Value("title")</h1>
<p>@Model.Value("intro")</p>

Model is IPublishedContent, the generic published-content node. Value("alias") returns the property’s converted value as object.

Typed, with ModelsBuilder. Equivalent output:

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.HomePage>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
    Layout = null;
}
<h1>@Model.Title</h1>
<p>@Model.Intro</p>

The two are equivalent. Model.Title is a generated property that calls Value<string>("title"). The typed form gets IntelliSense and a compile error on a renamed alias in SourceCode modes. A third, generic form also works: Model.Value<string>("title").

What ModelsBuilder generates

One partial class per document type, from the schema in the database:

[PublishedModel("homePage")]
public partial class HomePage : PublishedContentModel
{
    public HomePage(IPublishedContent content,
                    IPublishedValueFallback fallback)
        : base(content, fallback) { _fallback = fallback; }
 
    [ImplementPropertyType("title")]
    public virtual string? Title
        => this.Value<string>(_fallback, "title");   // ← just a wrapper
}

The magic is a wrapper over Value(). No ORM (object-relational mapper), no mapping layer: the model is the published node with typed getters. Compositions become C# interfaces (ISeoMeta), so a partial can take “anything with SEO fields”. Because the class is partial, you can add your own members in a second file.

Modes

Set with Umbraco:CMS:ModelsBuilder:ModelsMode:

ModeWhere models liveWhen regeneratedUse from C# code?
InMemoryAutocompiled in memory at runtimeautomatically on doc type changeNo, views only
SourceCodeAuto.cs files in umbraco/modelsautomatically, then you rebuildYes
SourceCodeManualsamewhen you click Generate on the dashboardYes
Nothingnone generatedneverYes, using committed files

The v17 change: InMemoryAuto and Razor runtime compilation moved into a separate package, Umbraco.Cms.DevelopmentMode.Backoffice, because .NET made runtime Razor compilation obsolete and it blocked Hot Reload. The default template still adds it (backoffice-development mode). In v19 the default mode becomes Nothing when that package is absent.

The practical split:

  • Backoffice-only builds (editing templates in the browser) → InMemoryAuto
  • Anything with controllers, services or CI (continuous integration) → SourceCodeAuto locally, commit the models, Nothing in production

Layouts

Standard Razor layouts. v18 renamed “master template” to layout template in the UI:

@* Views/Layout.cshtml *@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
<!doctype html>
<html>
<body>
    @RenderBody()
</body>
</html>
@* Views/HomePage.cshtml *@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.HomePage>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
    Layout = "Layout.cshtml";
}
<h1>@Model.Title</h1>

4. Partials and view components

Both are plain ASP.NET Core, and Umbraco adds nothing beyond passing published content into them.

Partial view. Markup reuse, model passed in:

@* Views/Partials/Hero.cshtml *@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.HomePage>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
<section class="hero">
    <h1>@Model.Title</h1>
</section>
@await Html.PartialAsync("Hero", Model)

View component. Markup plus its own logic and injected services. Use it when the fragment needs to fetch something (a nav, a basket count):

public class MainNavViewComponent : ViewComponent
{
    public IViewComponentResult Invoke(IPublishedContent current)
    {
        var root  = current.Root();                      // home node
        var items = root.Children().Where(x => x.IsVisible());
        return View(items);   // Views/Shared/Components/MainNav/Default.cshtml
    }
}
@await Component.InvokeAsync("MainNav", new { current = Model })

Rule of thumb: partial if it only formats what it’s given; view component if it has to go and get something.


5. Block List and Block Grid — page building

How editors compose pages from components. A block is an instance of an element type, stored inline in a property.

Data type "Page blocks"   property editor: Block List
  allowed blocks:
    heroBlock    content: heroBlock (element type)   settings: heroSettings
    quoteBlock   content: quoteBlock                 settings: —

Rendering, the built-in way. One partial per block, named after the element type alias:

@* in the page template *@
@Html.GetBlockListHtml(Model.Blocks)
@* Views/Partials/blocklist/Components/heroBlock.cshtml *@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
    var content  = (ContentModels.HeroBlock)Model.Content;
    var settings = Model.Settings as ContentModels.HeroSettings;   // may be null
}
<section class="hero @(settings?.Dark == true ? "hero--dark" : "")">
    <h2>@content.Heading</h2>
</section>

GetBlockListHtml loops the blocks and calls PartialAsync("blocklist/Components/" + alias, block). Equivalent hand-rolled loop, when you want control:

@foreach (var block in Model.Blocks ?? Enumerable.Empty<BlockListItem>())
{
    @await Html.PartialAsync("blocklist/Components/" + block.Content.ContentType.Alias, block)
}

Block List vs Block Grid vs the rest

EditorShapePick when
Block ListFlat ordered listStacked page sections. The default choice
Block Grid (v11+)Rows, columns, nested areas; editors set widthsEditors genuinely need layout control. Renders via @await Html.GetBlockGridHtmlAsync(Model.Grid) and partials in blockgrid/Components/, with areas rendered by GetBlockGridItemAreasHtmlAsync
Single Block (v18+)Exactly one blockReplaces Block List’s “single block mode”; v18 migrates those data types
Rich Text (Tiptap)Prose with blocks inlineArticles. Tiptap is the only built-in rich text editor from v16 (TinyMCE dropped over licensing)
Element Picker (v18+)Reference to a shared Element in the LibraryContent that’s the same everywhere (a call-to-action banner) and edited once

Blocks are copies; Elements are references. A block’s content lives inside the page’s property value. Edit it on one page and no other page changes. An Element (v18 Library) is stored once and referenced. v19 lets block editors reference Library Elements directly [CHECK: v19 is beta as of this date].

What a block list actually stores

The property value is one JSON blob in the database (v15+ shape):

{
  "layout": {
    "Umbraco.BlockList": [
      { "contentKey": "c1…", "settingsKey": "s1…" }
    ]
  },
  "contentData": [
    {
      "key": "c1…",
      "contentTypeKey": "…heroBlock's key…",
      "values": [ { "alias": "heading", "value": "Autumn range" } ]
    }
  ],
  "settingsData": [
    { "key": "s1…", "contentTypeKey": "…", "values": [ { "alias": "dark", "value": true } ] }
  ],
  "expose": [ { "contentKey": "c1…", "culture": null, "segment": null } ]
}

Layout is separate from data. layout holds order (and grid structure), contentData holds values, joined by key. It’s opaque to SQL: you can’t query “every page with a hero block” against the database, which is why reporting and search go through the index or the cache, not the tables.


6. Route hijacking — custom controllers

By default every page goes through RenderController.Index. Create a controller named {DocTypeAlias}Controller and Umbraco routes that doc type’s pages through it instead, by convention, with no route registration:

public class ProductPageController : RenderController
{
    private readonly IStockService _stock;
    private readonly IPublishedValueFallback _fallback;
 
    public ProductPageController(
        ILogger<ProductPageController> logger,
        ICompositeViewEngine viewEngine,
        IUmbracoContextAccessor ctx,
        IPublishedValueFallback fallback,
        IStockService stock)                 // ← your own DI service
        : base(logger, viewEngine, ctx)
    {
        _fallback = fallback;
        _stock = stock;
    }
 
    public override IActionResult Index()
    {
        var vm = new ProductViewModel(CurrentPage!, _fallback)   // the found node
        {
            InStock = _stock.IsInStock(((ProductPage)CurrentPage!).Sku)  // ← data from outside Umbraco
        };
        return CurrentTemplate(vm);          // still renders the node's own template
    }
}
 
// extends the generated model, so the view keeps every typed property
public class ProductViewModel : ProductPage
{
    public ProductViewModel(IPublishedContent content, IPublishedValueFallback fallback)
        : base(content, fallback) { }
 
    public bool InStock { get; init; }
}

The view then inherits UmbracoViewPage<ProductViewModel> and reads @Model.InStock beside @Model.Title.

Uses: enriching the model with external data (stock, prices), server-side paging, per-page auth, picking a different template on logic. An action named after a template (ProductAmpPage()) handles requests for that template (?altTemplate=ProductAmpPage).

Not for: forms. Form posts go to a SurfaceController (Html.BeginUmbracoForm<MyController>("Submit")), which knows the current page and can RedirectToCurrentUmbracoPage(). JSON APIs are ordinary ASP.NET Core controllers. UmbracoApiController and its auto-routing were removed in v18 (obsolete since v15).


7. Querying and navigating content

From the current page, in a view. Extension methods on IPublishedContent, LINQ (C#‘s built-in query methods: Where, OrderBy, Take) on top:

@{
    var home     = Model.Root();
    var section  = Model.AncestorOrSelf(2);
    var children = Model.Children().Where(x => x.IsVisible());
    var articles = home.Descendants<ArticlePage>()           // typed filter
                       .OrderByDescending(x => x.PublishDate)
                       .Take(5);
}
<ul>
@foreach (var a in articles)
{
    <li><a href="@a.Url()">@a.Title</a></li>
}
</ul>

By id, anywhere you have UmbracoHelper (in views, @Umbraco):

@{
    var page = Umbraco.Content(Guid.Parse("ca4249ed-2b23-4337-b522-63cabe5587d1"));
    var img  = Umbraco.Media(someGuid);
}

Outside a request (background job, notification handler): inject the services instead of relying on the ambient helpers:

  • IPublishedContentCache: get a node by key
  • IDocumentNavigationQueryService: root keys, children, parents as keys
  • IContentService: the editing API, which reads and writes drafts in the database. Never use it to render, since it skips the cache and hits SQL

Version notes, because job codebases span these:

  • XPath queries were removed in v14. ContentAtXPath, XPath in pickers and ContentXPath are gone. Replaced by LINQ, Dynamic Roots in pickers, and IContentLastChanceFinder
  • v18 removed the .Parent and .Children properties. Use the Parent() / Children() extension methods. A v13 codebase full of Model.Children won’t compile on 18
  • GetAtRoot() removed in v18, replaced by IDocumentNavigationQueryService.TryGetRootKeys
  • IPublishedContentQuery still exists for free-text search over the index. The docs warn against post-filtering its results in memory. v19 replaces the built-in Examine (Lucene) integration with Umbraco Search [CHECK: v19 beta]

Descendants() on a large tree walks every node. Fine on a 200-page site, a performance problem on a 50,000-page one. Use the search index there.


8. Dictionary items and multilingual

Two separate mechanisms:

Dictionary itemsLanguage variants
ForUI strings in templates: “Read more”, “Add to basket”Editorial content: titles, body
Lives inTranslation section, key → value per languageOn the content node, per property
Set upCreate key, fill each languageDoc type → Vary by culture, per property
In Razor@Umbraco.GetDictionaryValue("ReadMore")@Model.Title (current culture, automatic)

Variants mean one node with values per culture, not a copy of the tree per language. Set each property’s variance individually: a product’s title varies, its sku doesn’t.

node "About"           invariant: sku, image
  en-GB  title "About us"     url /about/       published ✓
  fr-FR  title "À propos"     url /fr/a-propos/ draft      ← not live in French
  • The culture is resolved from the domain assigned to the root node (example.com/fr/ → fr-FR)
  • Reading another culture explicitly: @Model.Value("title", "fr-FR", fallback: Fallback.ToLanguage)
  • In code with no request (a controller building a feed), set IVariationContextAccessor.VariationContext = new VariationContext("fr-FR") first
  • Segments are a further variation axis within a culture (personalisation variants). Niche and partly reworked in v19

The other common pattern, one tree per language with separate root nodes, also exists in the wild, mostly in older sites. Variants are the current model.


9. Media

A separate tree with media types (Image, File, Folder, plus your own). An image is a node with an umbracoFile property holding the path and focal point.

@if (Model.HeroImage is { } img)
{
    <img src="@img.GetCropUrl(width: 800)" alt="@img.Name">
    <img src="@Url.GetCropUrl(img, "square")" alt="">   @* named crop from the data type *@
}
  • Image Cropper data type: named crops plus a focal point, so GetCropUrl generates a resize URL served by ImageSharp. v19 moves to ImageSharp 4
  • Resize URLs are HMAC-signed (hash-based message authentication code) when Umbraco:CMS:Imaging:HMACSecretKey is set, so nobody can request arbitrary sizes. v19 rejects a non-canonical Base64 key at startup
  • Storage defaults to local disk (wwwroot/media). Azure Blob via a provider package for load-balanced or cloud hosting
  • v18 renames recycled media files with .deleted so they aren’t publicly reachable (EnableMediaRecycleBinProtection)

10. Members and protected content, briefly

  • Member types are a schema like doc types (a Member type with custom fields)
  • Login, registration and password reset use ASP.NET Core Identity underneath (IMemberManager, IMemberSignInManager). Umbraco ships snippet partials for the login form
  • Public Access on a content node restricts it to members, or to member groups, and redirects to a login page
  • Headless: the Delivery API can serve protected content to authorised members (OAuth token flows, or server-to-server) [CHECK: exact flow in v17/18 docs before using]
  • External login providers (OpenID Connect, Entra ID) can be configured for members and separately for backoffice users

For anything account-heavy (orders, profiles) most teams use Umbraco members for login only and keep the domain data in their own tables via EF Core (Entity Framework Core, .NET’s ORM), which is Reference - ASP.NET Core territory.


11. Headless — the Content Delivery API

Built in since v12, opt-in. JSON over REST, read-only, published content (plus drafts with preview). The same content tree, served as JSON. No templates needed.

Enable it. Two places:

{
  "Umbraco": {
    "CMS": {
      "DeliveryApi": {
        "Enabled": true,
        "PublicAccess": true,
        "ApiKey": "long-random-secret"
      }
    }
  }
}
builder.CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddDeliveryApi()      // ← the one added line
    .AddComposers()
    .Build();

Or dotnet new umbraco -da from the start. Once enabled, all published content is public by default: use PublicAccess: false plus ApiKey for a private API, or AllowedContentTypeAliases / DisallowedContentTypeAliases to scope it.

Endpoints (/umbraco/delivery/api/v2/…):

GET content/item/{id}              one node by GUID
GET content/item/{path}            one node by route — what a front end uses
GET content/items?id=…&id=…        several by GUID
GET content?fetch=…&filter=…&sort=…&skip=&take=    query

fetch   children:{id|path} · descendants:… · ancestors:…
filter  contentType:article · contentType:!article · name:guide
        createDate>2025-01-01 · updateDate<…
sort    createDate:desc · name:asc · sortOrder:asc · level:asc

headers Accept-Language: fr-FR      culture
        Start-Item: my-site         which root, for multi-site
        Preview: true + Api-Key     drafts
expand  ?expand=properties[heroImage,relatedPost]   pickers in full
fields  ?fields=properties[title,heroImage]         limit output

The content query endpoint reads a search index (DeliveryApiContentIndex) rather than the cache, so a rebuilt or stale index means stale query results while item/{path} is correct [CHECK: index mechanism under v19’s Umbraco Search]. Custom filters and sorters are C# extension points.

What a page looks like:

{
  "name": "Home",
  "id": "11fb598b-5c51-4d1a-8f2e-0c7594361d15",
  "contentType": "homePage",
  "route": { "path": "/", "startItem": { "id": "…", "path": "home" } },
  "properties": {
    "title": "Autumn range",
    "blocks": {
      "items": [
        {
          "content":  { "contentType": "heroBlock", "id": "…",
                        "properties": { "heading": "Autumn range" } },
          "settings": { "contentType": "heroSettings", "id": "…",
                        "properties": { "dark": true } }
        }
      ]
    }
  }
}

Note contentType on every block. On the front end that’s the switch for which component to render, the same job the partial name does in Razor.

A Next.js front end fetching it

// lib/umbraco.ts
const BASE = process.env.UMBRACO_URL; // https://cms.example.co.uk
 
export async function getPage(path: string, preview = false) {
  const res = await fetch(
    `${BASE}/umbraco/delivery/api/v2/content/item${path}`,
    {
      headers: {
        "Accept-Language": "en-GB",
        ...(preview && {
          Preview: "true",
          "Api-Key": process.env.UMBRACO_API_KEY!,   // server-side only
        }),
      },
      next: { tags: ["umbraco"], revalidate: preview ? 0 : 300 },
    },
  );
  if (res.status === 404) return null;
  return res.json();
}
// app/[...slug]/page.tsx   (the home page needs its own app/page.tsx, or use the optional catch-all form)
const blocks = { heroBlock: Hero, quoteBlock: Quote };   // contentType → component
 
export default async function Page({ params }) {
  const { slug = [] } = await params;
  const page = await getPage("/" + slug.join("/") + "/");
  if (!page) notFound();
  return page.properties.blocks?.items.map((b) => {
    const C = blocks[b.content.contentType];
    return C ? <C key={b.content.id} {...b.content.properties} settings={b.settings?.properties} /> : null;
  });
}

Front-end side in Reference - Next.js; the architecture choice in Headless Architecture and Rendering Strategies.

Typed client: v18 adds per-content-type OpenAPI schemas to the Delivery API, so a TypeScript client can be generated with real property types instead of properties: Record<string, unknown>.

Preview and cache invalidation in headless

The two problems every headless CMS has, and neither is automatic here:

  • Preview: the backoffice’s “Preview” button opens Umbraco’s own rendering. For a Next.js front end you implement an IUrlProvider whose GetPreviewUrlAsync returns your front end’s preview URL (with a token), and the front end then calls the API with Preview: true and the API key. See Preview Environments
  • Invalidation: Umbraco doesn’t know your front end cached the page. The usual pattern is a webhook (Settings → Webhooks, on Content Published / Unpublished) posting to a Next.js route that calls revalidateTag. Output caching on the Delivery API itself is opt-in and separate

12. Backoffice extensions

v14 (“Bellissima”) rebuilt the backoffice from AngularJS into Web Components, written in TypeScript with Lit, on the Umbraco UI Library (uui-* elements), talking to a new REST Management API. This is the biggest break in Umbraco’s history. See Web Components.

An extension is a manifest plus, usually, a JS module:

App_Plugins/MyDashboard/
  umbraco-package.json     ← replaces v13's package.manifest
  my-dashboard.js          ← built output of your Lit/TS element
{
  "name": "My Dashboard",
  "extensions": [
    {
      "type": "dashboard",
      "alias": "My.Dashboard.Stock",
      "name": "Stock dashboard",
      "element": "/App_Plugins/MyDashboard/my-dashboard.js",
      "meta": { "label": "Stock", "pathname": "stock" },
      "conditions": [ { "alias": "Umb.Condition.SectionAlias", "match": "Umb.Section.Content" } ]
    }
  ]
}
import { LitElement, html, customElement } from "@umbraco-cms/backoffice/external/lit";
 
@customElement("my-stock-dashboard")
export default class MyStockDashboard extends LitElement {
  render() { return html`<uui-box headline="Stock">…</uui-box>`; }
}
  • type selects one of many extension types: dashboard, section, propertyEditorUi, workspaceAction, headerApp, entityAction…
  • type, alias, name are required. weight, conditions, overwrites, kind, meta are optional
  • Scaffold one: dotnet new umbraco-extension -n MyExtension -ex gives a Razor class library with a Client/ Vite + TypeScript project
  • Property editors are split in two from v14: a server-side schema (C#, storage and validation) and a client-side UI (propertyEditorUi). Server-side PropertyValueConverters still turn stored values into model types

What it means for packages: every package with backoffice UI was rewritten for v14+. A v13 package does not run on v14+ unless the vendor ported it, and plenty were never ported. Before quoting an upgrade, list the packages and check each one’s latest supported major.

Server-side extension is unchanged ASP.NET Core: an IComposer registers services and notification handlers (Umbraco’s event model):

public class StockComposer : IComposer
{
    public void Compose(IUmbracoBuilder builder)
    {
        builder.Services.AddSingleton<IStockService, StockService>();
        builder.AddNotificationHandler<ContentPublishedNotification, ClearStockCacheHandler>();
    }
}

13. Packages that matter

PackageWhatWho makes itLicence
uSyncSerialises schema (doc types, data types, templates, dictionary, optionally content) to files on disk, imports on startup or on demand. The free answer to “schema lives in the DB”Jumoo (Kevin Jump), communityFree core; paid add-ons (uSync.Complete) [CHECK: current add-on naming]
Umbraco DeploySame job, built in at Umbraco Cloud: schema as .uda files in umbraco/Deploy/Revision, committed to git; content and media transferred between environments from the backofficeUmbraco HQCommercial, yearly licence on-premises; included with Cloud
Umbraco FormsEditor-built forms with workflows (email, save entries, post to URL)Umbraco HQCommercial for public domains; free locally; included with Cloud
Umbraco WorkflowApproval workflows for publishingUmbraco HQCommercial
Umbraco CommerceE-commerce on top of the CMS (formerly Vendr)Umbraco HQCommercial

Names to recognise: Contentment (property editors), SEO Checker, Umbraco Engage (personalisation and A/B testing, formerly uMarketingSuite), Umbraco Search (v19).


14. Environments and deployment

The core problem, which every database-backed CMS has:

                 lives in        moves between environments by
CODE             git             your pipeline                ✓ normal
TEMPLATES        .cshtml in git  your pipeline                ✓ normal
SCHEMA           the database    ??? ← doc types made in dev's backoffice
                                       don't exist in prod's DB
CONTENT          the database    editors make it in PROD;
                                 flows prod → dev, not dev → prod
MEDIA            disk / blob     with the content

Schema flows left to right with code; content flows right to left, or not at all. Ship code that expects heroImage to a database without it, and the generated model compiles against a property that’s missing in prod. That’s the schema drift problem. See Database Migrations for the generic version.

Three answers:

  • uSync: on save, schema is written to uSync/ as XML. Commit it, and the target environment imports on startup. Free, file-based, git-diffable
  • Umbraco Deploy: same idea with .uda files, plus a backoffice “transfer” for content and media between environments. Standard on Cloud
  • Code-first migrations: create doc types in C# with Umbraco’s migration framework (AsyncMigrationBase from v16; the sync base class was removed in v18). Precise, but verbose and uncommon outside packages

Content the other way: restore prod’s DB to dev (watch for personal data in members and Forms entries), or use Deploy’s restore, or uSync content export.

Umbraco Cloud, briefly

Umbraco HQ’s PaaS (platform as a service). Worth a platform note of its own, so only the shape here.

  • Managed hosting on Microsoft Azure, run by Umbraco
  • Environments left to right: local → development → staging → live, each a git repo. Pushing deploys code and schema (via Deploy). Content is transferred in the backoffice, not via git
  • Flexible environments for feature work off the mainline
  • Includes Deploy and Forms licences
  • Automatic patch upgrades by default; minors configurable; majors are manual
  • Billing model is per project by plan tier [CHECK: verify the plan axes before quoting; figures to a quote]

You don’t need Cloud. Umbraco runs anywhere .NET runs: Azure App Service, IIS, Linux containers. Self-hosted plus uSync plus a normal CI pipeline is the common agency setup.


Versions and licensing

Open source, MIT licence (the CMS core, verified on GitHub). The money is in Cloud, Deploy, Forms, Commerce, Workflow and support.

Cadence: a major every ~6 months, tracking .NET. LTS (long-term support: 2 years of fixes, then 1 more of security fixes only) lands each November–December alongside a .NET LTS release (the even-numbered ones: .NET 8 → v13, .NET 10 → v17). STS (short-term support: 9 months of fixes, then 3 of security) in between. EOL = end of life, no more patches.

MajorReleasedType.NETWhat changed — why it matters in an inherited codebase
8Feb 2019—.NET Framework 4.7.2Last on .NET Framework. Variants, NuCache. EOL Feb 2025 — still found in the wild; moving off it is a rewrite, not an upgrade
9Sep 2021STS.NET 5The ASP.NET Core port. Everything since is the same platform
10Jun 2022LTS.NET 6SQLite support. EOL Jun 2025
11Dec 2022STS.NET 7Block Grid
12Jun 2023STS.NET 7Content Delivery API, EF Core support
13Dec 2023LTS.NET 8Last AngularJS backoffice. Webhooks. Security-only now; EOL 14 Dec 2026
14May 2024STS.NET 8Bellissima: Web Components backoffice, Management API, umbraco-package.json. XPath, macros, doc type inheritance (new) removed. Every backoffice package broke
15Nov 2024STS.NET 9HybridCache replaces NuCache, lazy loading; snapshots removed; models regenerated; block JSON uses keys
16Jun 2025STS.NET 9TinyMCE removed, Tiptap only; async migrations
17Nov 2025LTS.NET 10System dates stored as UTC (migration); InMemoryAuto moved to its own package; current LTS, security phase to Nov 2027, EOL Nov 2028
18Jun 2026STS.NET 10Elements + Library, Single Block editor, typed Delivery API OpenAPI schemas, Swashbuckle → Microsoft.AspNetCore.OpenApi, UmbracoApiController and .Children/.Parent properties removed. Latest: 18.3.0 (29 Oct 2026)
19Dec 2026 (planned)STS.NET 11Beta now. Examine → Umbraco Search, cookie backoffice auth, ~400 obsolete members removed. Upgrades only from 16.4+

Dates and support types from Umbraco’s LTS and end-of-life page; .NET targets from each release’s build files on GitHub, except v9 [CHECK: v9 on .NET 5].

Reading an inherited codebase: v8 = old .NET Framework, a rewrite to move. v10–13 = modern .NET, AngularJS backoffice. v14+ = new backoffice. v13 → v17 is the upgrade every v13 site faces, because 13’s support ends in December 2026.


Required versus optional

QuestionAnswer
Does every document type need a template?No. Headless sites, element types, and container nodes (folders, settings) have none. A templateless page in a Razor site 404s unless a hijacking controller handles it
Do I need ModelsBuilder?No. Model.Value("alias") works without it. But every real codebase uses it, and the mode must match how you build
Do I need a custom controller?No. RenderController serves every page. Only for extra data or logic
Do I need the Delivery API to go headless?No, but it’s the default answer. Alternatives: your own ASP.NET Core API controllers reading IPublishedContentCache, or (v13 and earlier) third-party GraphQL packages
Can I use it without Razor?Yes. Delivery API plus any front end. The backoffice still runs, and Umbraco is still the ASP.NET Core host
Do I need Umbraco Cloud?No. Self-host anywhere .NET runs
Do I need uSync or Deploy?No, technically. With more than one environment, without one of them schema is copied by hand, which is how drift happens
Do I need SQL Server?No. SQLite works, and is fine for dev and small sites. SQL Server / Azure SQL for anything load-balanced
Do I need to write TypeScript?Only for backoffice UI. Front-end Razor sites and Delivery API work need none
Do I need compositions?No, but without them every page type redefines its SEO fields
Does a block need a settings element type?No. Content type required, settings optional
Is LTS required?No; STS is fully supported for ~9 months. LTS if the site won’t be upgraded every 6 months, which is most client sites

The kitchen sink

Labelled as such. Don’t write a template like this. It shows the pieces coexisting: typed model, layout, composition interface, dictionary, variants with fallback, media crops, blocks, navigation, a view component and member checks.

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.ArticlePage>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@using Umbraco.Cms.Core.Models.PublishedContent
@inject Umbraco.Cms.Core.Security.IMemberManager Members
@{
    Layout = "Layout.cshtml";
    var seo      = Model as ContentModels.ISeoMeta;                  // composition
    var home     = Model.Root();
    var related  = Model.Siblings<ContentModels.ArticlePage>()
                        .Where(x => x.IsVisible())
                        .Take(3);
    var loggedIn = Members.IsLoggedIn();
}
 
@section head {
    <title>@(seo?.MetaTitle ?? Model.Title)</title>
}
 
@await Component.InvokeAsync("MainNav", new { current = Model })
 
<article>
    <h1>@Model.Value("title", fallback: Fallback.ToLanguage)</h1>
 
    @if (Model.HeroImage is { } img)
    {
        <img src="@img.GetCropUrl(width: 1200)" alt="@img.Name">
    }
 
    @Html.GetBlockListHtml(Model.Blocks)
 
    @if (!loggedIn)
    {
        <a href="/login/">@Umbraco.GetDictionaryValue("SignInToComment")</a>
    }
</article>
 
<aside>
    <h2>@Umbraco.GetDictionaryValue("RelatedArticles")</h2>
    @foreach (var a in related)
    {
        <a href="@a.Url()">@a.Title</a>
    }
</aside>

A complete small project

A “Landing Page” doc type with a title and a block list of heroes, end to end, in a self-hosted repo using uSync.

Folder layout

MySite/
  Program.cs                          as in rung 1
  appsettings.json
  appsettings.Development.json
  MySite.csproj
  umbraco/models/                     generated, committed (SourceCodeAuto)
    LandingPage.generated.cs
    HeroBlock.generated.cs
  uSync/v17/                          schema, committed  [CHECK: folder name per uSync major]
    ContentTypes/landingpage.config
    ContentTypes/heroblock.config
    DataTypes/LandingBlocks.config
  Views/
    Layout.cshtml
    LandingPage.cshtml
    Partials/blocklist/Components/heroBlock.cshtml

appsettings.Development.json: typed models written as files, so controllers and CI can use them

{
  "Umbraco": {
    "CMS": {
      "ModelsBuilder": { "ModelsMode": "SourceCodeAuto" },
      "Runtime": { "Mode": "Development" }
    }
  }
}

appsettings.json (production): no generation, use the committed files

{
  "Umbraco": {
    "CMS": {
      "ModelsBuilder": { "ModelsMode": "Nothing" },
      "Runtime": { "Mode": "Production" }
    }
  }
}

The schema, as uSync writes it. Trimmed, and the realistic artefact for “where is the doc type defined”: XML in git, not C# [CHECK: element names against a real v17 uSync export]

<!-- uSync/v17/ContentTypes/landingpage.config -->
<ContentType Key="5f1c…" Alias="landingPage" Level="1">
  <Info>
    <Name>Landing Page</Name>
    <Icon>icon-rocket</Icon>
    <AllowAtRoot>True</AllowAtRoot>
    <DefaultTemplate>LandingPage</DefaultTemplate>
    <Compositions />
  </Info>
  <GenericProperties>
    <GenericProperty>
      <Key>a01…</Key>
      <Name>Title</Name>
      <Alias>title</Alias>
      <Definition>0cc0eba1-9960-42c9-bf9b-60e150b429ae</Definition> <!-- Textstring data type -->
      <Type>Umbraco.TextBox</Type>
      <Mandatory>true</Mandatory>
      <Tab Alias="content">Content</Tab>
    </GenericProperty>
    <GenericProperty>
      <Key>a02…</Key>
      <Name>Blocks</Name>
      <Alias>blocks</Alias>
      <Definition>9d4e…</Definition>                            <!-- "Landing blocks" data type -->
      <Type>Umbraco.BlockList</Type>
      <Tab Alias="content">Content</Tab>
    </GenericProperty>
  </GenericProperties>
</ContentType>

umbraco/models/LandingPage.generated.cs: generated, trimmed

namespace Umbraco.Cms.Web.Common.PublishedModels
{
    [PublishedModel("landingPage")]
    public partial class LandingPage : PublishedContentModel
    {
        public LandingPage(IPublishedContent content, IPublishedValueFallback fallback)
            : base(content, fallback) { _fallback = fallback; }
 
        private readonly IPublishedValueFallback _fallback;
 
        [ImplementPropertyType("title")]
        public virtual string? Title => this.Value<string>(_fallback, "title");
 
        [ImplementPropertyType("blocks")]
        public virtual BlockListModel? Blocks => this.Value<BlockListModel>(_fallback, "blocks");
    }
}

Views/Layout.cshtml

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
<!doctype html>
<html lang="en-GB">
<head>
    <meta charset="utf-8">
    <title>@Model.Name</title>
</head>
<body>
    @RenderBody()
</body>
</html>

Views/LandingPage.cshtml

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.LandingPage>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
    Layout = "Layout.cshtml";
}
<main>
    <h1>@Model.Title</h1>
    @Html.GetBlockListHtml(Model.Blocks)
</main>

Views/Partials/blocklist/Components/heroBlock.cshtml

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
    var hero = (ContentModels.HeroBlock)Model.Content;
}
<section class="hero">
    <h2>@hero.Heading</h2>
    @if (hero.Image is { } img)
    {
        <img src="@img.GetCropUrl(width: 1600)" alt="@img.Name">
    }
</section>

Deploy flow: change a doc type locally → uSync writes .config and ModelsBuilder writes .generated.cs → commit both with the views → pipeline builds and deploys → the target imports uSync on startup → schema, models and views all agree.


The round trip

One value, editor to HTML, in both modes:

BACKOFFICE        Landing Page › Content tab › "Title" field
   ↓  editor types "Autumn range", Save and Publish
DOCUMENT TYPE     property alias "title", data type Textstring (Umbraco.TextBox)
   ↓
DATABASE          umbracoPropertyData: varcharValue = "Autumn range"     (draft + published versions)
   ↓  publish
PUBLISHED CACHE   cmsContentNu row + HybridCache entry for the node
   ↓  this.Value<string>(_fallback, "title")
MODELSBUILDER     LandingPage.Title  → "Autumn range"
   ↓  @Model.Title
RAZOR             <h1>@Model.Title</h1>
   ↓
HTML              <h1>Autumn range</h1>

            — or, headless —

DELIVERY API      GET /umbraco/delivery/api/v2/content/item/autumn/
                  { "contentType": "landingPage",
                    "properties": { "title": "Autumn range", … } }
   ↓  page.properties.title
NEXT.JS           <h1>{page.properties.title}</h1>

The table name (umbracoPropertyData) is the storage detail you’d never normally touch [CHECK: column name for short text in v17]. The point is that “title” is the one string joining all seven layers.


The comparison set

The other .NET CMSs in UK job specs, with basic facts only:

UmbracoOptimizely CMS (formerly Episerver)Sitecore
FrameworkASP.NET CoreASP.NET Core from CMS 12XP/XM (Experience Platform / Experience Manager): ASP.NET on .NET Framework; XM Cloud: SaaS, headless with a Next.js front end [CHECK]
LicenceOpen source (MIT) coreCommercialCommercial
HostingSelf-host anywhere, or Umbraco CloudOptimizely DXP (digital experience platform: their Azure-based cloud) mostly; also a SaaS CMS [CHECK]Self-host/managed (XP), or SaaS (XM Cloud) [CHECK: current product naming after 2025 rebrands]
Content modelDoc types defined in the backoffice, stored in DBContent types defined in C# classes (code-first)Templates/data templates as items in the content tree
Typical buyerMid-market, agency-built, UK/EU heavyMid-to-enterprise, commerce-adjacentEnterprise, marketing-suite buyers

The line that generalises: Optimizely is code-first (schema is a C# class, deployed like code, so no drift problem), and Umbraco is DB-first (schema is made in a UI and needs uSync/Deploy to travel). That one difference explains most of the workflow differences between them.


Where it bites

  • The v13 → v14+ upgrade isn’t an upgrade for the backoffice. Every AngularJS customisation (dashboards, property editors, package.manifest) is a rewrite in TypeScript/Lit. Every package needs a v14+ release. Server-side Razor code mostly survives; the editor UI doesn’t. Plan it as a project and audit packages first. v19 also only upgrades from 16.4+, so 13 → 17 → 19 is two hops
  • Removed APIs pile up across majors. XPath (v14), IPublishedSnapshot (v15), UmbracoApiController and the .Children/.Parent properties (v18). A v13 codebase upgraded straight to 18 meets all of them at once. Fixing obsolete warnings on the last patch of each major first is the documented route
  • Schema drift. Doc type created in prod’s backoffice “just quickly”, not in uSync → next deploy overwrites or conflicts. Rule: schema changes happen locally, never in prod. Lock Settings for editors in production
  • ModelsBuilder mode mismatch. InMemoryAuto on a site with controllers → HomePage type not found at compile time. SourceCodeAuto without a rebuild → model and DB disagree, and the property silently returns null. Nothing in prod with stale committed models → same. The fix is always: regenerate, rebuild, commit
  • Published cache surprises. Content changed directly in SQL (or via IContentService without publishing) doesn’t appear until republished or the cache is rebuilt (Settings → Published Status). On v15+, cold items load lazily, so the first request after a deploy is slow unless seeded. On load-balanced setups, misconfigured server roles mean one node never invalidates
  • IContentService in a view. Reads drafts from SQL on every render: correct-looking and slow. Render from the published cache only
  • Block List vs Block Grid, chosen late. Converting stored data between them isn’t a config switch (Single Block ↔ Block List is, from v18). Block Grid gives editors layout freedom you then have to support in CSS at every breakpoint. Default to Block List unless layout control is a real requirement
  • Blocks aren’t shared. Editors expect editing a block to update it everywhere. It doesn’t; that’s what v18 Elements are for
  • Changing a data type changes every property using it. “Make this picker allow two items” changes the returned type from IPublishedContent to IEnumerable<…> and breaks views elsewhere. v19 splits several editors into single and multiple variants for exactly this reason
  • Preview with headless needs building. The backoffice preview shows Umbraco’s rendering, not your Next.js site, until you implement the preview URL provider and a draft route. Unpublished child nodes, pickers pointing at drafts and expanded properties all need the Preview header too
  • Delivery API query staleness. /content?filter=… reads the index. Index out of date → query results lag the item endpoint
  • Delivery API is public once enabled. Default PublicAccess: true exposes every published node, including ones never linked from the site
  • Members vs users. Granting a “member” backoffice access, or the reverse, isn’t possible. They’re separate systems
  • Packages on STS. Packages often skip STS majors or ship late. Being on an STS release with a key package stuck on the previous major blocks security upgrades. Another reason client sites sit on LTS