I'm attempting to create some Block Grid content for a node with the property of pageBody.
I've got this working by using the Content Service and it's working nicely for the most part.
I have a structure that looks like this:
Row
Column
Editor
Column
Editor
The editors in this case are a custom doc type used to build a carousel.
To create the structure and content I'm creating a JSON object which follows the Block Grid content structure and it's all working nicely until it comes to creating the block list items which represent each slide.
This is the JSON that I'm using to create the block grid:
Adding block grid content programatically
Hi,
I'm attempting to create some Block Grid content for a node with the property of
pageBody
.I've got this working by using the Content Service and it's working nicely for the most part.
I have a structure that looks like this:
The editors in this case are a custom doc type used to build a carousel.
To create the structure and content I'm creating a JSON object which follows the Block Grid content structure and it's all working nicely until it comes to creating the block list items which represent each slide.
This is the JSON that I'm using to create the block grid:
This creates the rows, the columns, and the carousel but the
carouselSlides
property is empty.For comparison, an example of the slides I'm trying to create look like this:
If I create the content manually and get the data back, it comes back like this:
This structure looks to match, but it simple won't appear on the content when I view it in the UI.
This is how I'm saving the content:
There are no errors and everything saves but not the carousel slides.
I've spent quite a lot of time on this and am struggling to figure out what's going on, please put my out of my misery!
Thanks,
Ben
I went for a walk and it suddenly dawned on me that I'd specified the wrong data type,
Umbraco.BlockGrid
should beUmbraco.BlockList
.Very silly, but glad it's fixed so I can move on!
is working on a reply...