The "now you see me, now you don't" package for Umbraco Block List and Block Grid!
Ever wanted to temporarily hide a block without deleting it? Maybe it's a seasonal promo, a work-in-progress section, or that testimonial from your ex-client. Whatever the reason - Hide It has your back.
Works with both Block List and Block Grid editors.
- One-Click Toggle — Eye icon right there in the block action bar. Click it. Done.
- Visual Feedback — Hidden blocks get dimmed so you know what's hiding
- Zero View Changes — Hidden blocks vanish from the frontend automagically
- Search-Safe Content — Hidden block content is excluded from Umbraco search indexing
- Nested Support — BlockGrid areas? Yep, filters all the way down
dotnet add package Our.Umbraco.HideIt- Add a True/False property to your block's Settings element type
- Give it the alias
hideIt - There is no step 3
The toggle appears. The magic happens. Your frontend stays clean.
Need more control? See Advanced / Extensibility near the end.
Nothing! That's the point. Hidden blocks just... aren't there. The package intercepts Umbraco's property converters and filters them out before your views even see them.
- Umbraco 17.5+ (that's when block actions became a thing) or 18.x
- .NET 10.0
| Package Version | Umbraco Version |
|---|---|
| 18.x | 18.0.0 - 18.x |
| 17.x | 17.5.0 - 17.x |
Maybe hideIt isn't your style, or you're migrating a site that already has its own "hide this" property. Point Hide It at any alias in appsettings.json:
{
"HideIt": {
"PropertyAlias": "hideFromSite"
}
}Both the backoffice toggle and the frontend filtering pick up the custom alias. Leave the setting out and the default hideIt keeps working.
Set HideIt:CssPath to your own stylesheet path in appsettings.json:
{
"HideIt": {
"CssPath": "/css/hideit-custom.css"
}
}- If
CssPathis not set, Hide It keeps the current default dimmed styling for hidden blocks. - If
CssPathis set, Hide It skips its default styling and loads your stylesheet instead (including inside block-entry shadow roots).
Hide It adds these state markers on each block entry:
- Hidden state:
data-hideit-hiddenattribute +.hideit-block--hiddenclass - Visible state:
.hideit-block--visibleclass
Use those selectors in your CSS to style hidden/visible blocks exactly how you want.
You can override the action icon for both states in appsettings.json:
{
"HideIt": {
"VisibleIcon": "/icons/power.svg",
"HiddenIcon": "/icons/power-off.svg"
}
}VisibleIconcontrols the icon shown when the block is currently visible.HiddenIconcontrols the icon shown when the block is currently hidden.- Values must be SVG paths (for example
/icons/power.svg).
Don't trust the magic? Fair. Extension methods are available:
using HideIt;
// Filter manually
var visibleBlocks = Model.Blocks.WhereVisible();
var visibleGrid = Model.Grid.WhereVisible();
// Check a single block
if (!block.IsBlockHidden())
{
// This block is ready for its close-up
}If you previously replaced BlockListPropertyValueConverter or BlockGridPropertyValueConverter, switch to Hide It's filter extension points instead:
using HideIt;
using Umbraco.Cms.Core.Models.Blocks;
public class MyCustomBlockListFilter : IHideItBlockListFilter {
public BlockListModel Filter(BlockListModel model) {
// Your custom filtering/transformation
return model;
}
}
public class MyCustomBlockGridFilter : IHideItBlockGridFilter {
public BlockGridModel Filter(BlockGridModel model) {
// Your custom filtering/transformation
return model;
}
}
builder.Services.AddSingleton<IHideItBlockListFilter, MyCustomBlockListFilter>();
builder.Services.AddSingleton<IHideItBlockGridFilter, MyCustomBlockGridFilter>();This keeps Hide It's built-in hide logic and your custom logic in the same pipeline without chained converter Replace<>() calls.
An in-repo Umbraco 18 site is available under HideIt.Test.
- Open
HideIt.slnx - Start
HideIt.Testwith IIS Express or the Umbraco.Web.UI profile - The site uses the local
HideIt.csprojvia project reference, so backoffice/frontend changes are picked up automatically - The sample is intentionally a single-page homepage test surface focused on Content Rows (Block List) and Content Grid (Block Grid)
- The sample ships with a seeded SQLite database, so you can start testing immediately
- Backoffice login:
admin@example.com/1234567890
Found a bug? Create an issue here. Got an idea? PRs welcome!
MIT