Getting the name of an area from a block in a stack
PermalinkI am using the following in a block controller
$this->block->getAreaHandle()
But it comes back as "Main" - I think this is because the block is in a stack, which is then in an area.
How can I find out what the original name of the area is?
Thanks.

if($bID) { $db = Loader::db(); $cbv = $db->GetRow("SELECT * FROM CollectionVersionBlocks WHERE bID = $bID"); if($cbv && isset($cbv['cID'])) { $csd = $db->GetRow("SELECT * FROM btCoreStackDisplay WHERE stID = " . intval($cbv['cID']) . " ORDER BY bID DESC "); if($csd && isset($csd['bID'])) { $cbv = $db->GetRow("SELECT * FROM CollectionVersionBlocks WHERE bID = " . $csd['bID']); $arHandle = $cbv['arHandle']; } } }