Jon*_*ing 3 php routing magento http-status-code-404
有没有办法从块或模板中检查您所在的页面是否为404?
404页面是Mage_Cms_IndexController::noRouteAction()在一个vanilla Magento安装中呈现的,所以你可以试试这样的东西:
$action = Mage::app()->getRequest()->getActionName();
if ($action == 'noRoute'){
//do some stuff
}
Run Code Online (Sandbox Code Playgroud)