how to detect area when adding a block?

Permalink
I want to be able to know the areaHandle for the area I'm attempting to add a block to, from within that block's controller.

I put this in the block's add() function:
$b = Block::getByID($this->bID);
$this->set('areaHandle', $b->getAreaHandle());

with no luck. I can access other generic block properties, but not the Area handle.

Specifically, I want to check the areaHandle against a list of scrapbook handles (which I already have).

kirkroberts
 
teamorange replied on at Permalink Reply
teamorange
I have the same problem. Is there already a solution.
Thank you.
kirkroberts replied on at Permalink Reply
kirkroberts
I don't remember if I came up with a way to do this... I must have worked around it somehow. Sorry!
teamorange replied on at Permalink Reply
teamorange
no problem