kasparboelkjeldsen / Knowit.Umbraco.InstantBlockPreview

An Umbraco package that supports in editor preview of block content - razor and headless
7 stars 4 forks source link

Blocklisteditor with nested blocklist items #9

Open royws opened 2 months ago

royws commented 2 months ago

Hi,

In the V14 version is it possible to have a blocklist with preview that has a nested blocklist property that displays with the default blocklisteditor view without preview? The 'enableFor' setting doesn't appear to consider nested blocklists, it tries to apply the preview there as well.

kasparboelkjeldsen commented 2 months ago

That is kinda tricky to do, as what is only 1 render, which is your blocklist that has nested blocklists in it. So the razor view engine parses it all the way down and returns html for all of it.

If someone can think of a nice way to do this, I'm all for it, but I don't believe this would work even with the "old" custom view functionality in Umbraco 13 and older? (Assuming you've given the original block list a view)