SplatDev.Umbraco.Common 2.0.3

dotnet add package SplatDev.Umbraco.Common --version 2.0.3
                    
NuGet\Install-Package SplatDev.Umbraco.Common -Version 2.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SplatDev.Umbraco.Common" Version="2.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SplatDev.Umbraco.Common" Version="2.0.3" />
                    
Directory.Packages.props
<PackageReference Include="SplatDev.Umbraco.Common" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SplatDev.Umbraco.Common --version 2.0.3
                    
#r "nuget: SplatDev.Umbraco.Common, 2.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SplatDev.Umbraco.Common@2.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SplatDev.Umbraco.Common&version=2.0.3
                    
Install as a Cake Addin
#tool nuget:?package=SplatDev.Umbraco.Common&version=2.0.3
                    
Install as a Cake Tool

SplatDev.Umbraco.Common

Common extension methods and utilities for Umbraco development. Provides a rich set of helpers for working with published content, strings, cookies, TempData, security headers, runtime minification, and custom content finders — reducing boilerplate across all SplatDev Umbraco plugins.

NuGet License: MIT

Compatibility

.NET Umbraco Package Version
8.0 13.12.0 1.0.0
10.0 17.3.4 1.0.0

Installation

dotnet add package SplatDev.Umbraco.Common

Usage

PublishedContentExtensions

Easily traverse and query the Umbraco content tree.

using SplatDev.Umbraco.Common.Extensions;

var currentPage = UmbracoContext.PublishedRequest.PublishedContent;

// Get ancestor by document type alias
var homePage = currentPage.AncestorOfType("home");

// Get children of a specific type
var articles = currentPage.ChildrenOfType("article");

// Get a strongly-typed property value
var title = currentPage.GetPropertyValue<string>("title");

// Check if content has a template
bool hasTemplate = currentPage.HasTemplate();

StringExtensions

using SplatDev.Umbraco.Common.Extensions;

string raw = "Hello World! This is a test.";

// Generate a URL-safe slug
string slug = raw.ToUrlSlug(); // "hello-world-this-is-a-test"

// Truncate with ellipsis
string excerpt = raw.Truncate(15); // "Hello World!..."

// Strip HTML tags
string clean = "<p>Text</p>".StripHtml(); // "Text"

CookieExtensions

using SplatDev.Umbraco.Common.Extensions;

// Set a cookie
Response.SetCookie("user_pref", "dark-mode", 30); // expires in 30 days

// Get a cookie value
string pref = Request.GetCookieValue("user_pref");

// Delete a cookie
Response.DeleteCookie("user_pref");

TempDataExtensions

using SplatDev.Umbraco.Common.Extensions;

// Store complex objects in TempData
TempData.Put("alert", new { Type = "success", Message = "Saved!" });

// Retrieve complex objects from TempData
var alert = TempData.Get<dynamic>("alert");

RuntimeMinifierExtensions

using SplatDev.Umbraco.Common.Extensions;

// Minify HTML at runtime
string html = "<div>   <p>Hello</p>   </div>";
string minified = html.MinifyHtml();

// Minify CSS
string css = "body { color: red; }";
string minifiedCss = css.MinifyCss();

// Minify JavaScript
string js = "function hello() { return 'world'; }";
string minifiedJs = js.MinifyJs();

FallbackExtensions

using SplatDev.Umbraco.Common.Extensions;

// Safe null-coalescing for Umbraco properties
string metaDescription = currentPage
    .Fallback("metaDescription", "description")
    .GetValue<string>() ?? "Default description";

SanitizedUrlContentFinder

A custom IContentFinder that sanitizes incoming URLs before content lookup — normalizes trailing slashes, lowercases paths, and strips query strings for clean content matching.

// Registered automatically via IComposer or manually:
builder.Services.AddSingleton<IContentFinder, SanitizedUrlContentFinder>();

Features

  • PublishedContentExtensions — Safe traversal, property access, and content querying
  • StringExtensions — URL slugs, truncation, HTML stripping
  • RuntimeMinifierExtensions — On-the-fly HTML, CSS, and JS minification
  • FallbackExtensions — Graceful property fallback chains for Umbraco content
  • CookieExtensions — Simplified cookie read/write/delete operations
  • TempDataExtensions — Store and retrieve complex objects in TempData
  • SanitizedUrlContentFinder — URL normalization content finder
  • Security headers via Joonasw.AspNetCore.SecurityHeaders and NWebsec

Dependencies

Package Purpose
Umbraco.Cms.Core (v13.12.0 / v17.3.4) Umbraco core APIs
Umbraco.Cms.Web.Common (v13.12.0 / v17.3.4) Umbraco web framework
Umbraco.Cms.Web.Website (v13.12.0 / v17.3.4) Umbraco website runtime
Joonasw.AspNetCore.SecurityHeaders (v6.0.0) CSP and security header middleware
NWebsec.AspNetCore.Middleware (v3.0.0) Additional security middleware

Target Frameworks

  • net8.0 — for Umbraco 13 applications (v13.12.0)
  • net10.0 — for Umbraco 17 applications (v17.3.4)

SplatDev.Umbraco.Common — part of the SplatDev.Umbraco.Plugins suite. Licensed under MIT. © SplatDev Ltda.

Changelog

2.0.3 — 2026-08-24

Removes a dashboard screenshot that showed an error toast. It was captured against a site where this plugin's API was unreachable, so it advertised a broken dashboard. No screenshot is better than a misleading one; a replacement will be taken against a working install.

2.0.2 — 2026-08-24

Package metadata only: the listing now carries an icon and search tags, and the project and repository links point at the organisation that actually hosts this code. No code changes.

2.0.1 — 2026-08-24

This package now keeps a changelog. Earlier releases predate it and are not reconstructed here — consult the repository history for those. From this version on, every release records what changed for someone using it.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SplatDev.Umbraco.Common:

Package Downloads
SplatDev.Umbraco.Plugins.Mailer

Umbraco mailer plugin supporting Umbraco 13 (net8.0) and Umbraco 17 (net10.0)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.3 40 8/24/2026