public function action_news() { $slug = $this->request->param('slug'); $pageData = $this->newsModel->findNews(null, null, $slug == 'all' ? null : $slug, 'all'); $content = $this->contentModel->getContent('news', $pageData); $footer = View::factory('footer')->set('pagesImgs', []); $this->template->set('content', $content)->set('footer', $footer); $this->response->body($this->template); }
public function action_project() { $slug = $this->request->param('id'); $pageData = Arr::get($this->contentModel->findPortfolioProject(null, null, $slug), 0, []); $view = 'page'; $content = $this->contentModel->getContent($view, $pageData)->set('projectGalleryImgs', $this->contentModel->findProjectImgs(Arr::get($pageData, 'id'), null, null, 1)); $footer = ''; $this->template->set('content', $content)->set('footer', $footer); $this->response->body($this->template); }
function index() { $model = new Model_Content(); $content = $model->getContent(); $this->template->vars('content', $content); $this->template->view('index'); }