/** * Print X products in tip * @return void * @param string flag (column) which has to be set to TRUE * @param integer number of products */ public function block_flag($flag, $num) { // Creating instance of model and fetching data $products = new Product_Model(); $data = $products->get_flag($flag, $num); // View $template = new View('block_flag'); $template->data = $data; $template->render(TRUE); }