$this->_helper->layout->setLayout('kebudayaan'); $pageNumber = $this->getParam('page'); $newsDb = new Model_DbTable_News(); $news = $newsDb->getAllWithDesc($this->_languageId); $paginator = Zend_Paginator::factory($news); $paginator->setItemCountPerPage(8); $paginator->setCurrentPageNumber($pageNumber); $this->view->headTitle()->prepend($this->view->translate('News')); $this->view->paginator = $paginator; $this->view->news_chunk = array_chunk(iterator_to_array($paginator), 2); array_unshift($this->_meta, $this->view->translate('News'), "berita kebudayaan"); $this->view->headMeta()->appendName('keywords', join(', ', $this->_meta)); $this->view->headMeta()->appendName('description', "Kebudayaan Indonesia - Laman referensi kebudayaan Indonesia. Turut mewujudkan bangsa Indonesia yang cerdas dan berbudaya"); $this->view->headLink()->headLink(array('rel' => 'canonical', 'href' => Zend_Controller_Front::getInstance()->getRequest()->getScheme() . '://' . Zend_Controller_Front::getInstance()->getRequest()->getHttpHost() . $this->view->url(array(), $this->_languageId == 1 ? 'berita' : 'news', true)), 'PREPEND'); } /** * IS: Parameter id, title terdeklarasi * Desc: Fungsi untuk menampilkan detail news */ public function detailAction() { $this->_helper->layout->setLayout('kebudayaan'); $this->view->langId = $this->_languageId; // Varible $contentType = 1; // News // Param $id = $this->_getParam('id'); $title = $this->_getParam('title'); // Model $newsDb = new Model_DbTable_News(); // Data $news = $newsDb->getAllWithDescById($id, $this->_languageId); // $author = $newsDb->getAuthor($id,$this->_languageId)->toArray();