File ID from Image block
Permalink 1 user found helpful
I am trying to do something with Pagelists, I can grab all the blocks from a page and with the code below I can get the content out of a Content Block.
I would like to do something similar with an Image block and get the FIle ID of the image in the block. I've tried things like ->fID, ->getFID, those don't work, Anyone know how to do it?
Thanks
Peter
I would like to do something similar with an Image block and get the FIle ID of the image in the block. I've tried things like ->fID, ->getFID, those don't work, Anyone know how to do it?
Thanks
Peter
$pBlocks = $page->GetBlocks(); foreach ($pBlocks as $pBlock){ if ($pBlock->btHandle == 'content') { $blockContent = $pBlock->getInstance(); echo $pBlock->getContent; } }