Hide It adds block-level visibility control to Umbraco, letting editors toggle blocks on or off without deleting them. It works with both Block List and Block Grid editors, and requires no changes to your views.
- One-click toggle: An eye icon in the block action bar switches a block between visible and hidden
- Visual feedback: Hidden blocks are visually dimmed in the backoffice
- No view changes required: Hidden blocks are automatically excluded from frontend rendering
- Search-safe: Hidden block content is excluded from Umbraco search indexing
- Nested support: Filtering applies recursively within Block Grid areas
dotnet add package Our.Umbraco.HideIt- Add a True/False property to your block's Settings element type
- Set its alias to
hideIt
The toggle appears automatically in the block action bar.
See Advanced / Extensibility below for configuration options.
Hide It replaces Umbraco's built-in block property value converters. Hidden blocks are filtered out before reaching your views, so no template changes are required.
- Umbraco 17.5+ (that's when block actions became a thing), 18.x, or 19.x (pre-release)
- .NET 10.0 (.NET 11 for Umbraco 19)
| Package Version | Umbraco Version |
|---|---|
| 19.x (pre-release) | 19.0.0-beta1+ |
| 18.x | 18.0.0 - 18.x |
| 17.x | 17.5.0 - 17.x |
Note:
19.xtracks Umbraco 19, which is currently in beta. These releases are published as GitHub/NuGet pre-releases and may contain breaking changes until Umbraco 19 reaches a stable (GA) release.
To use an existing property instead of hideIt, set a custom alias in appsettings.json:
{
"HideIt": {
"PropertyAlias": "hideFromSite"
}
}Both the backoffice toggle and the frontend filtering use this alias. If unset, hideIt is used.
To use your own styling instead of the default dimmed appearance, set HideIt:CssPath:
{
"HideIt": {
"CssPath": "/css/hideit-custom.css"
}
}- If unset, Hide It applies its default dimmed styling to hidden blocks.
- If set, Hide It's default styling is skipped and your stylesheet is loaded instead (including inside block-entry shadow roots).
Hide It applies these markers to each block entry, which can be targeted in custom CSS:
- Hidden state:
data-hideit-hiddenattribute and.hideit-block--hiddenclass - Visible state:
.hideit-block--visibleclass
Override the action icon for each state in appsettings.json:
{
"HideIt": {
"VisibleIcon": "/icons/power.svg",
"HiddenIcon": "/icons/power-off.svg"
}
}VisibleIconis shown when the block is visible.HiddenIconis shown when the block is hidden.- Values must be paths to SVG files.
Extension methods are available for filtering outside the automatic pipeline:
using HideIt;
var visibleBlocks = Model.Blocks.WhereVisible();
var visibleGrid = Model.Grid.WhereVisible();
if (!block.IsBlockHidden())
{
// Block is visible
}If you have replaced BlockListPropertyValueConverter or BlockGridPropertyValueConverter with your own implementation, use Hide It's filter extension points instead of chaining converter Replace<>() calls:
using HideIt;
using Umbraco.Cms.Core.Models.Blocks;
public class MyCustomBlockListFilter : IHideItBlockListFilter {
public BlockListModel Filter(BlockListModel model) {
// Custom filtering/transformation
return model;
}
}
public class MyCustomBlockGridFilter : IHideItBlockGridFilter {
public BlockGridModel Filter(BlockGridModel model) {
// Custom filtering/transformation
return model;
}
}
builder.Services.AddSingleton<IHideItBlockListFilter, MyCustomBlockListFilter>();
builder.Services.AddSingleton<IHideItBlockGridFilter, MyCustomBlockGridFilter>();This keeps Hide It's built-in filtering and your custom logic in the same pipeline.
An in-repo Umbraco 19 (pre-release) site is available under HideIt.Test.
- Open
HideIt.slnx - Start
HideIt.Testwith IIS Express or the Umbraco.Web.UI profile - The site references
HideIt.csprojdirectly, so backoffice/frontend changes are picked up automatically - The sample is a single-page homepage focused on Content Rows (Block List) and Content Grid (Block Grid)
- A seeded SQLite database is included, so you can start testing immediately
- Backoffice login:
admin@example.com/1234567890
Found a bug or have a feature request? Open an issue here. Pull requests are welcome.
MIT