API call to create and populate accordion
Permalink Browser Info Environment
Hi,
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:
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,
Lian
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,
Lian
Type: | Pre-Sale |
---|---|
Status: | In Progress |
no worries, I got it.
Thanks,
Lian