Code for moving a block from one area to another

Permalink
I'm trying to move a block from one area to another and I'm stuck. The block disappears from the source area but doesn't appear in the target area... I'm doing this in a job.

Here is what I'm doing :

// $block archived from source area
$blocksIDs = $page->getBlockIDs('Articles Archivés);
array_unshift($blocksIDs, $block->getBlockID()); // this should put the moved block in first position in the target area
$page->processArrangement('Articles Archivés', $block->getBlockID(), $blockIDs);


Any idea on what I'm doing wrong ?

 
dangrth replied on at Permalink Reply
Ok, I figured it out : processArrangement needs the Area ID, not the handle...