_forward('front'); return; } $request = $this->getRequest(); // new url format; if set to 'url:' only it'll resolve current main module (if any) if(strpos($location, 'url:') === 0) { $url = substr($location, 4); $request->setPathInfo($url)->setRequestParams(array()); $router = eFront::instance()->getRouter(); if($router->route($request, true)) { if($request->getRoute() == $indexRoute) { throw new eException('Infinite loop detected while dispatching front page.', 2); } define('e_FRONTPAGE', true); $this->_forward($request->getRoute()); return; } $this->_forward('system/error/notfound', array('frontPageErorr' => null)); } // route is provided elseif(strpos($location, 'route:') === 0) { list($route, $qstr) = explode('?', substr($location, 6).'?'); if(!$qstr) $qstr = array(); else parse_str($qstr, $qstr); $request->setRoute($route); $request->setRequestParams($qstr); if($request->getRoute() == $indexRoute) { throw new eException('Infinite loop detected while dispatching front page.', 2); } define('e_FRONTPAGE', true); $this->_forward($request->getRoute(), $qstr); return; } // redirect to this address elseif(strpos($location, 'http://') === 0 || strpos($location, 'https://') === 0) { if(e_REQUEST_URL != $location) { header("Location: {$location}"); exit; } } // Enter in legacy mod, include the front page elseif(strpos($location, '.php') !== false) { list($page, $qstr) = explode("?", $location."?"); $request->setLegacyPage($page) ->setLegacyQstring($qstr); $request->routed = true; define('e_FRONTPAGE', true); define('e_URL_LEGACY', $location); eFront::isLegacy('{e_BASE}'.$page); e107::canonical('_SITEURL_'); return; } // Redirect else { $location = SITEURL.$location; if(e_REQUEST_URL != $location) { header("Location: {$location}"); exit; } } // we can't do much $this->_forward('system/error/notfound', array('frontPageErorr' => null)); } public function actionFront() { // we could notify current theme we are in front page controlled by the theme layout only... // switch off tablerender $this->getResponse()->setParam('render', false); } }