Block Grid on Umbraco 14
# help-with-umbraco
m
Hi there, Has anyone successfully created a block grid property on v14? I've tried on 3 different installations, and the editor turns up bare every time. The "Install Sample Configuration" option never shows up either - no matter if it's a new installation or not. https://cdn.discordapp.com/attachments/1252611661026562179/1252611661228150844/Skrmbillede_2024-06-18_151002.png?ex=6672d904&is=66718784&hm=acb5d1607cb47061d231e2e858696948ad4953087f1d8ba09c25239edf404d61&
j
Would you mind sharing the configuration of your block grid data type, please?
The "Install Sample Configuration" button is not available yet, but the sample block views from V13 can be copied over if needed.
d
Hi @Mort I have Block Grid working in 14. I did not use the "Install Sample Configuration" though I just made it manually. What do you need help with?
Unfortunately Block Preview does not yet work but I think @rickbutterfield may be working on something.
m
Looks promising @Dean Leigh - fingers crossed I made an error 😄
here is my data type config
very bare bones
d
And the Content Model for StringElement ?
d
It looks like you have everything right
Please feel free to run umbootstrap and copy the files and code
I didn't have to change anything for 14
r
Unless you have areas defined on the grid, I think you’ll need “Allow in Root” enabled on StringElement config in the grid
m
i'll give that a shot
Neither defining an area nor "allow in root" worked - I'll try giving umbootstrap a go
d
You will see in UmBootstrap I use HQ's default.cshtml, items.cshtml, areas.cshtml and area.cshtml files almost exactly as they designed it to work i.e. Create some layouts allowed at root with some areas in them, then create some features that are allowed in areas. I find that pattern is exceptionally flexible.
m
It works fine when I do a usync import of the UmBootstrap files
one thing I did notice, in the usync files there is a lot of information missing on the grid editor I created - now this might be a usync issue, or something else is wrong
d
Which files and I can send my code
m
I've compared to the ones that UmBootstrap installs
In the Datatype I created
I Added one of the layout blocks I copied from UmBootstrap, to my on grid editor, and set "allowed on root" and "allowed in areas" - and now it works ...
At least I can add a layout block ... just can't add anything to that 😄
d
So the layout only need "allowed on root" and must contain at least 1 area, then your features need to have "allowed in areas"
m
Thanks a bunch ❤️ - got it working now
d
Fantastic!
m
For some reason the area (when clicking "Add Area") is only half width, which seems a little odd
but that's something I can live with
hmmm didn't notice the resize option
will make a feature request to have that a bit more visible - I only found it by chance
Thanks for the help @Dean Leigh - much appreciated!
d
My pleasure, please tell people about UmBootstrap, I made it to evangelise Block Grid which I ❤️ Hopefully I will have one in V14 soon
m
Will do!
h
UmBootstrap is great 👍
a
Does UmBootstrap works on umbraco 14?
a
@Dean Leigh how did you get it working?
d
Manually created everything
195 Views