I've been trying to use the Block List property editor in a custom macro (Umbraco 9.4.3) but have failed to get it up and running. My goal is to give editors the opportunity to insert a specific functionality into any document type containing a grid for which the Block List would be the perfect choice, since it offers that much flexibility compared to the custom solution that I have now. The property editor is much more expandable to other element type blocks and offers a great UI for editors. I have seen the post "Block list editor in the grid" and the suggestion to use "Doc Type Grid Editor", but the package is retired.
The element type which I used for testing purposes:
I didn't find any notable documentation for the configuration of the property editor. Before creating the macro I have added a block list property to a document type with the desk element type added to the blocks array. This way I tried getting the right config by calling angular.element($0).scope() on various parts of the rendered html in the browser console in the backoffice. I don't think that's the right way of figuring out the configuration but I couldn't find anything relevant on the github page of the block list controller definition (There might be some key information that I'm missing).
The button Add LinkElement is rendered, but the error vm.umbVariantContent is null is thrown upon clicking it. The stacktrace is:
I have also tried wrapping <umb-property-editor> in an <umb-property> element which lead to a different error Could not find umbVariantContent in the $scope chain. The html in that case:
Did you find a solution to your problem, mate? I've run into this same issue. I have a client who wants to borrow and use blocks we've designed in the middle of their RTE content. I thought this would be a fast and easy solution, but using the block list editor in any capacity outside of standard content editing has proven difficult.
Please let me know if you found a solution, and I'll do the same.
Unfortunately, I didn't find a solution to this problem. Since we are working on providing a minimal viable product, I couldn't spend more time tinkering with something that might not be possible. If I happen to stumble across a solution, I will gladly let you know.
Using Block List in macro property editor
I've been trying to use the Block List property editor in a custom macro (Umbraco 9.4.3) but have failed to get it up and running. My goal is to give editors the opportunity to insert a specific functionality into any document type containing a grid for which the Block List would be the perfect choice, since it offers that much flexibility compared to the custom solution that I have now. The property editor is much more expandable to other element type blocks and offers a great UI for editors. I have seen the post "Block list editor in the grid" and the suggestion to use "Doc Type Grid Editor", but the package is retired.
The element type which I used for testing purposes:
In the html of the macro I have the following:
The code of the controller:
I didn't find any notable documentation for the configuration of the property editor. Before creating the macro I have added a block list property to a document type with the desk element type added to the blocks array. This way I tried getting the right config by calling angular.element($0).scope() on various parts of the rendered html in the browser console in the backoffice. I don't think that's the right way of figuring out the configuration but I couldn't find anything relevant on the github page of the block list controller definition (There might be some key information that I'm missing).
The button Add LinkElement is rendered, but the error
vm.umbVariantContent is null
is thrown upon clicking it. The stacktrace is:I have also tried wrapping
<umb-property-editor>
in an<umb-property>
element which lead to a different errorCould not find umbVariantContent in the $scope chain
. The html in that case:The macro displayed to the editor:
What am I missing and is this even the right way to achieve what I try to do?
Hi Dusan,
Did you find a solution to your problem, mate? I've run into this same issue. I have a client who wants to borrow and use blocks we've designed in the middle of their RTE content. I thought this would be a fast and easy solution, but using the block list editor in any capacity outside of standard content editing has proven difficult.
Please let me know if you found a solution, and I'll do the same.
Hey Mark,
Unfortunately, I didn't find a solution to this problem. Since we are working on providing a minimal viable product, I couldn't spend more time tinkering with something that might not be possible. If I happen to stumble across a solution, I will gladly let you know.
is working on a reply...