public function after() { // if no subnav has been defined search for one if ($this->view !== NULL and !$this->view->has_subnav()) { $this->_nav(strtolower($this->request->controller()), $this->request->action()); } parent::after(); }
public function after() { if ($this->view !== NULL) { $map_links = array('index' => 0, 'stock' => 1, 'logs' => 2); $this->view->links = array(array('name' => 'Shop', 'link' => Route::url('item.user_shop.index')), array('name' => 'Stock', 'link' => Route::url('item.user_shop.stock')), array('name' => 'Logs', 'link' => Route::url('item.user_shop.logs')), array('name' => 'View', 'link' => $this->_view_shop())); if (array_key_exists($this->request->action(), $map_links)) { $this->view->links[$map_links[$this->request->action()]]['active'] = TRUE; } } parent::after(); }