Our.Umbraco.TagHelpers
2.1.0-rc2
dotnet add package Our.Umbraco.TagHelpers --version 2.1.0-rc2
NuGet\Install-Package Our.Umbraco.TagHelpers -Version 2.1.0-rc2
<PackageReference Include="Our.Umbraco.TagHelpers" Version="2.1.0-rc2" />
<PackageVersion Include="Our.Umbraco.TagHelpers" Version="2.1.0-rc2" />
<PackageReference Include="Our.Umbraco.TagHelpers" />
paket add Our.Umbraco.TagHelpers --version 2.1.0-rc2
#r "nuget: Our.Umbraco.TagHelpers, 2.1.0-rc2"
#:package Our.Umbraco.TagHelpers@2.1.0-rc2
#addin nuget:?package=Our.Umbraco.TagHelpers&version=2.1.0-rc2&prerelease
#tool nuget:?package=Our.Umbraco.TagHelpers&version=2.1.0-rc2&prerelease
Our Umbraco TagHelpers
A community package of ASP.NET Core Razor tag helpers for Umbraco CMS: translations, member-only content, responsive images, inline SVGs and more, written as HTML instead of C#. One NuGet package for Umbraco 16, 17, 18 and 19.
📖 Documentation: umbraco-community.github.io/Our-Umbraco-TagHelpers
Install
dotnet add package Our.Umbraco.TagHelpers
Then register the tag helpers by adding this line at the bottom of Views/_ViewImports.cshtml:
@addTagHelper *, Our.Umbraco.TagHelpers
See Installation and Configuration for the details.
An example
@* Rather than *@
@if (!string.IsNullOrWhiteSpace(Model.Heading))
{
<h1>@Model.Heading</h1>
}
@* you can write *@
<h1 our-text-if="@Model.Heading" />
The tag helpers
Each one links to its page in the docs, with every attribute, setting and example.
Content and language
| Tag helper | What it does |
|---|---|
<our-dictionary> |
Outputs a dictionary translation for the current page's language, with fallbacks. |
<our-fallback> |
Outputs a property using Umbraco's fallback modes, or the content inside the tag when there's no value. |
<our-hreflang> |
Outputs the hreflang alternate links for each language version of the current page. |
<our-lang-switcher> |
Renders a language switcher for every language and domain, with a Mustache template for the markup. |
<our-link> |
Renders a link from a Multi URL Picker, with an optional fallback when no link is set. |
Show or hide
| Tag helper | What it does |
|---|---|
our-if |
Renders an element and its children only when an expression is true. |
our-text-if |
Fills an empty element with a value, or leaves the element out when the value is empty. |
our-member-include / our-member-exclude |
Shows or hides an element depending on the logged-in member's member groups. |
our-user-include / our-user-exclude |
Shows or hides an element depending on the logged-in backoffice user's user groups. |
Performance
| Tag helper | What it does |
|---|---|
<our-img> |
Renders a fast, responsive <img> or <picture> from a media item or file, with crops and lazy loading. |
<our-svg> |
Inlines an SVG file or media item into the page, with caching, a viewBox fix and script removed. |
<our-cache> |
ASP.NET Core's cache tag helper, turned off in preview and debug, and cleared when content is published. |
our-self-host |
Downloads a third-party script, stylesheet or image once and serves it from your own site. |
Site building
| Tag helper | What it does |
|---|---|
our-controller |
Posts a plain HTML form to an Umbraco surface controller, instead of Html.BeginUmbracoForm. |
our-active-class |
Adds a CSS class to a link when it points to the current page or one of its ancestors. |
<our-edit-link> |
Shows a link to edit the current page in the backoffice, only to users who can edit content. |
<our-bytes> |
Shows a number of bytes, or a media item's file size, as a readable size such as 1.1 MB. |
<our-version> |
Prints the version number of your website project, or of any loaded assembly. |
Removed in version 2: <our-macro>, as Umbraco 14 removed macros. See Removed tag helpers, and Upgrading to version 2 if you're coming from 1.x.
Supported versions
| Umbraco | .NET |
|---|---|
| 16 | .NET 9 |
| 17 (LTS) | .NET 10 |
| 18 | .NET 10 |
| 19 | .NET 11 |
Version 1.x supports earlier versions of Umbraco, from Umbraco 9. Its README is on the main branch.
Contributing
Issues, ideas and pull requests are welcome. Version 2 is developed on the v2/dev branch.
- The demo site: a sample of every tag helper, on any supported Umbraco version (
dotnet run --project Our.Umbraco.TagHelpers.TestSite). - Cross-version tests: the unit tests and the Playwright suite that checks every sample on Umbraco 16 to 19.
- Packing and writing the docs.
Video 📺
Attribution
The logo for Our.Umbraco.TagHelpers is made by Freepik from flaticon.com
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. net11.0 is compatible. |
-
net10.0
- Stubble.Core (>= 1.10.8)
- Umbraco.Cms.Core (>= 17.0.0)
- Umbraco.Cms.Web.Common (>= 17.0.0)
-
net11.0
- Stubble.Core (>= 1.10.8)
- Umbraco.Cms.Core (>= 19.0.0-rc2)
- Umbraco.Cms.Web.Common (>= 19.0.0-rc2)
-
net9.0
- Stubble.Core (>= 1.10.8)
- Umbraco.Cms.Core (>= 16.0.0)
- Umbraco.Cms.Web.Common (>= 16.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Our.Umbraco.TagHelpers:
| Package | Downloads |
|---|---|
|
Our.Community.CustomForm
Custom forms add-on for UmBootstrap |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0-rc2 | 0 | 11/26/2026 |
| 2.1.0-rc1 | 102 | 11/17/2026 |
| 2.0.0 | 17,905 | 1/27/2026 |
| 1.2.0 | 122,163 | 5/12/2023 |
| 1.1.0 | 2,171 | 5/5/2023 |
| 1.0.0 | 17,181 | 11/17/2022 |
| 0.8.0 | 8,066 | 9/6/2022 |
| 0.7.0 | 4,468 | 8/5/2022 |
| 0.6.0 | 7,766 | 2/24/2022 |
| 0.5.1 | 3,744 | 11/21/2021 |
| 0.5.0 | 1,392 | 11/19/2021 |
| 0.4.0 | 1,848 | 11/16/2021 |
| 0.3.0 | 1,525 | 10/28/2021 |
| 0.2.0 | 1,480 | 10/27/2021 |
| 0.1.0 | 1,800 | 10/19/2021 |
