public function indexAction() { $model = new App_Model_Page(); $this->view->model = $model->fetchRow(array("name ='news'", 'active = 1')); $news = new App_Model_News(); $this->view->news = $news->fetchAll(array('active=1'), array('created DESC', 'order')); }
public function getMenuXML() { $menu_pages = $this->fetchAll(array('active = 1', "type = 'page'"), 'order'); $news = new App_Model_News(); $menu_news = $news->fetchAll(array('active = 1'), 'created DESC', 10); $posts = new App_Model_Posts(); $menu_posts = $posts->fetchAll(array('active = 1'), 'created DESC', 10); Zend_Debug::dump($menu_pages, 'Pages'); }
public function indexAction() { $this->view->message = $this->_helper->flashMessenger->getMessages(); $model = new App_Model_News(); $this->view->model = $model->fetchAll(null, array('created DESC', 'id DESC')); }
public function getMenuXML() { $this->_name = 'page_test'; $menu_pages = $this->fetchAll(array('active = 1', "type = 'page'"), 'created ASC'); $news = new App_Model_News(); $menu_news = $news->fetchAll(array('active = 1'), 'created DESC', 10); $posts = new App_Model_Posts(); $menu_posts = $posts->fetchAll(array('active = 1'), 'created DESC', 10); $i = 0; foreach ($menu_pages as $row) { $this->menuRecursion($row); } return $this->menuArray; Zend_Debug::dump($this->menuArray, 'Pages'); }