is there a way to remove the default action context? I was experimenting a bit with the contexts and ran into following problem:
public function init()
{
$contextSwitch = $this->_helper->getHelper('contextSwitch');
if (!$contextSwitch->hasContext('admin')) {
$contextSwitch->addContext('admin', array(
'suffix' => '',
'headers' => array(),
'callbacks' => array(
'init' => array('Amz_Controller_Action_Context_Admin', 'initAdminContext'),
'post' => array('Amz_Controller_Action_Context_Admin', 'postAdminContext')
)
));
}
$contextSwitch->clearActionContexts('test'); // no effect
$contextSwitch->setActionContext('test', 'admin') // no effect
->initContext();
}
What I would want, is that I specify the admin context for certain actions. Trough hostname routinger ways (admin.domain.com) I'm already taken care of setting the format=admin, but I want to prevent that they load and render the page the default way. I know there are probably other ways but it seems strange to me that even if you specify that you only want context X, you still have to worry about the default context.
没有评论:
发表评论