Our.Umbraco.BlockPreview
1.0.0-rc2
See the version list below for details.
dotnet add package Our.Umbraco.BlockPreview --version 1.0.0-rc2
NuGet\Install-Package Our.Umbraco.BlockPreview -Version 1.0.0-rc2
<PackageReference Include="Our.Umbraco.BlockPreview" Version="1.0.0-rc2" />
paket add Our.Umbraco.BlockPreview --version 1.0.0-rc2
#r "nuget: Our.Umbraco.BlockPreview, 1.0.0-rc2"
// Install Our.Umbraco.BlockPreview as a Cake Addin #addin nuget:?package=Our.Umbraco.BlockPreview&version=1.0.0-rc2&prerelease // Install Our.Umbraco.BlockPreview as a Cake Tool #tool nuget:?package=Our.Umbraco.BlockPreview&version=1.0.0-rc2&prerelease
Our.Umbraco.BlockPreview
Our.Umbraco.BlockPreview enables easy to use rich HTML previews for the Umbraco Block List and Block Grid editors.
<img src="https://raw.githubusercontent.com/rickbutterfield/Our.Umbraco.BlockPreview/main/.github/readme-assets/icon.png" alt="Our.Umbraco.BlockPreview icon" height="150" align="right">
Todo
- Support for BlockList or BlockGrid with settings models
- Add support for ModelsBuilder modes other than
SourceCodeManual
/SourceCodeAuto
- Add support for areas
- Get it working with the Umbraco Block Grid Example Website
Installation
The Umbraco 10.4+ version of this package is available via NuGet.
To install the package, you can use either .NET CLI:
dotnet add package Our.Umbraco.BlockPreview --version 1.0.0-rc2
or the older NuGet Package Manager:
Install-Package Our.Umbraco.BlockPreview -Version 1.0.0-rc2
Usage
This package installs a custom Angular preview for both the Block List and Block Grid editors.
When setting up a block to be part of the List or Grid, setting the 'Custom View' property to the appropriate block-[grid|list]-preview.html
file will generate preview HTML based on the respective partial view found in /Views/Partials/blocklist/Components
or /Views/Partials/blockgrid/Components
.
How to select the custom views when creating a Block List/Grid:
Before and after of how components look within the Block Grid:
Grid-specific setup
When using the new Block Grid, any reference to
@await Html.GetBlockGridItemAreasHtmlAsync(Model)
should be replaced with
@await Html.GetPreviewBlockGridItemAreasHtmlAsync(Model)
which can be found in Our.Umbraco.BlockPreview.Extensions
. This ensures that the grid editors correctly load in the back office.
Credits
This package is entirely based on the amazing work done by Dave Woestenborghs for 24days in Umbraco 2021. His code has been extended to support the new Block Grid editor in v10.4/v11 and turned into this package.
Matthew Wise also wrote a great article for 24days in Umbraco 2022 which added the ability to surface ViewComponents
and has allowed his code to be contributed.
License
Copyright © 2022-2023 Rick Butterfield, and other contributors.
Licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net7.0
- Umbraco.Cms.Web.BackOffice (>= 10.4.0-rc && < 12.0.0)
- Umbraco.Cms.Web.Common (>= 10.4.0-rc && < 12.0.0)
- Umbraco.Cms.Web.Website (>= 10.4.0-rc && < 12.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.3.1 | 224 | 6/26/2023 | |
1.3.0 | 317 | 6/20/2023 | |
1.2.3 | 333 | 5/24/2023 | |
1.2.2 | 142 | 5/24/2023 | |
1.2.1 | 681 | 4/12/2023 | |
1.2.0 | 186 | 4/12/2023 | |
1.1.2 | 269 | 3/14/2023 | |
1.1.1 | 216 | 3/7/2023 | |
1.1.0 | 246 | 2/25/2023 | |
1.0.1 | 360 | 2/3/2023 | |
1.0.0 | 309 | 1/24/2023 | |
1.0.0-rc2 | 166 | 1/5/2023 | |
1.0.0-rc1 | 153 | 12/22/2022 | |
1.0.0-alpha005 | 183 | 12/7/2022 | |
1.0.0-alpha004 | 158 | 12/5/2022 | |
1.0.0-alpha003 | 144 | 12/2/2022 | |
1.0.0-alpha002 | 144 | 12/2/2022 | |
1.0.0-alpha001 | 181 | 12/2/2022 |