Custom Block - view.php - How to determine if page is in edit mode in a stack?

Permalink
<?php global $c; if ($c->isEditMode()) { ?> //Do something <?php } ?>


This works fine if a block is in a normal area, but not if this block is inside a stack. How do I access this method inside a stack?

Thanks in advance!
Matthias

programmieraffe
View Replies:
TravisN replied on at Permalink Reply
TravisN
Anyone have an answer to this one? I have a similar issue except I'm not sure if I'm in a stack. I'm still creating a custom block template for autonav, but I need to adjust it's position when in edit mode

global $c is empty and view::getCollectionObject() is also returning an empty result.

Concrete v5.5+
programmieraffe replied on at Permalink Reply
programmieraffe
Long time, no answer, but now I have a solution. Works for me at least.

$view = View::getInstance();
if($view->controller instanceof DashboardBlocksStacksController)
{
echo "we're in a stack";
}


Cheers,
Matthias
mnakalay replied on at Permalink Reply
mnakalay
I know old thrzad, but this is so great and I've been looking for it for so long. thank you thank you thank you.