public function action_index() { $this->data['product'] = Model_Base_Product::get_by(array('where' => array(array('status', '=', 1)))); $total_product = Model_Base_Product::count_by(array('where' => array(array('status', '=', 1)))); View::set_global('total_page', ceil($total_product / _DEFAULT_LIMIT_)); $this->template->title = 'Product List'; $this->template->content = View::forge($this->layout . '/product/list', $this->data); }