/** * Method suitable for callbacks that sets the breadcrumbs according to this view context * * @return void */ public function setBreadcrumbs() { $pathway = KFactory::get('lib.koowa.application')->getPathWay(); //Checks the view properties first, in case they're already set if (!isset($this->forum)) { $this->forum = $this->getModel()->getItem(); } foreach ($this->forum->getParents() as $parent) { $pathway->addItem($parent->title, $this->createRoute('view=forum&id=' . $parent->id)); } parent::setBreadcrumbs(); }
/** * Method suitable for callbacks that sets the breadcrumbs according to this view context * * @return void */ public function setBreadcrumbs() { parent::setBreadcrumbs(); $model = $this->getModel(); $pathway = KFactory::get('lib.koowa.application')->getPathWay(); $id = $model->getState()->at; if (!$id) { return; } $person = KFactory::tmp('admin::com.ninjaboard.model.people')->id($id)->getItem(); //@TODO consider using the username instead of display_name in this part $name = $person->display_name; $pathway->addItem('@' . $name, $this->createRoute('view=topics&at=' . $id)); }