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
<PackageReference Include="SplatDev.Umbraco.Common" Version="2.0.3" />
<PackageVersion Include="SplatDev.Umbraco.Common" Version="2.0.3" />
<PackageReference Include="SplatDev.Umbraco.Common" />
paket add SplatDev.Umbraco.Common --version 2.0.3
#r "nuget: SplatDev.Umbraco.Common, 2.0.3"
#:package SplatDev.Umbraco.Common@2.0.3
#addin nuget:?package=SplatDev.Umbraco.Common&version=2.0.3
#tool nuget:?package=SplatDev.Umbraco.Common&version=2.0.3
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.
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 queryingStringExtensions— URL slugs, truncation, HTML strippingRuntimeMinifierExtensions— On-the-fly HTML, CSS, and JS minificationFallbackExtensions— Graceful property fallback chains for Umbraco contentCookieExtensions— Simplified cookie read/write/delete operationsTempDataExtensions— Store and retrieve complex objects in TempDataSanitizedUrlContentFinder— URL normalization content finder- Security headers via
Joonasw.AspNetCore.SecurityHeadersandNWebsec
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 | Versions 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. |
-
net10.0
- Joonasw.AspNetCore.SecurityHeaders (>= 6.0.0)
- NWebsec.AspNetCore.Middleware (>= 3.0.0)
- Umbraco.Cms.Api.Management (>= 17.3.4)
- Umbraco.Cms.Core (>= 17.3.4)
- Umbraco.Cms.Infrastructure (>= 17.3.4)
- Umbraco.Cms.Web.Common (>= 17.3.4)
- Umbraco.Cms.Web.Website (>= 17.3.4)
-
net8.0
- Joonasw.AspNetCore.SecurityHeaders (>= 6.0.0)
- NWebsec.AspNetCore.Middleware (>= 3.0.0)
- Umbraco.Cms.Core (>= 13.12.0)
- Umbraco.Cms.Infrastructure (>= 13.12.0)
- Umbraco.Cms.Web.BackOffice (>= 13.12.0)
- Umbraco.Cms.Web.Common (>= 13.12.0)
- Umbraco.Cms.Web.Website (>= 13.12.0)
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 |