V13.7.1 + BlockPreview package
Trying my best to use a blockgrid block to add a carousel. Each item in the carousel has it’s own link, text, layout controls as well as the image, so I thought I’d have each one as a blocklist item and have a blockgrid (HeroBannerBlock) with just the blocklist (HeroBannerItem) as it’s only content. So far, so good.
Now I’m totally confused as to exactly what I need to render this in the back office.
If I add a HeroBannerBlock, then I can see an “Add Hero Banner Item” in the slideout. If I click on that, it fails, no further slideout, nothing.
As for partials, I now just have a HeroBannerItem.cshtml which would be the full carousel code. However, it breaks. If I replace it all with the work “Hello” then as soon as I click into “Add Hero Banner Item” I see the work “Hello” rendered in the slideout.
I suppose my questions are:-
- If I get it right, will this be beyond the scope of the BlockPreview package to render it in the back office?
- How do I get it right? Do I need a partial for HeroBannerBlock as well as one for the HeroBannerBlockItem?
- If I need a partial for HeroBannerBlock, what should be in it? I’ve tried one with just
@Html.GetBlockListHtml(Model.Content.HeroBannerItem)
in it, thinking it would then render out the BlockList, but it breaks.
What should be the right approach, whether I have to build my own backoffice renderer or not?
Thanks.