API call to create and populate accordionBrowser Info Environment
Thank you very much for releasing this block for free!
I am trying to create and populate one item in the accordion, using C5.7's API.
As an example, this works for the simple (built-in) "content" block:
$block = \BlockType::getByHandle('content'); $data = array( 'content' => $attributes['rawhtml'], ); $page->addBlock($block, 'Main', $data);
So, for your block I have tried:
and the block gets created but no items in it. When viewed on page it says:
"You did not add any items to the accordion."
Could you please let me know what is the correct form of the $data for this to work?
Thanks a lot,