I’m trying to programmatically add an image block to a page using the code below. I can add the image block and set the “openLinkInNewWindow” without issue. But I cannot link it to an internal page by cID.
I see where the image is being created in btContentImage and, if I manually add the link cID into the associated row, it works. I just need to be able to add it programmatically through my package.
$blockType = \BlockType::getByHandle('image');
$blockName = "BLOCKNAME";
$data = array(
'fID' => $thumbID,
'internalLinkCID' => 123,
'openLinkInNewWindow' => true
);
$c->addBlock($blockType, $blockName, $data);