Ejemplo n.º 1
0
 public function breadcrumbsAndSubpages($location)
 {
     if ((int) trim(str_replace('news', null, $location), '/')) {
         $location = 'news';
     }
     $item = $this->model->getByLocation($location);
     if (!empty($item)) {
         return array('breadcrumbs' => $this->model->getBreadcrumbsByItem($item), 'subpages' => $this->model->getAllByParent($item['id']));
     }
     return array();
 }