⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

GroceryCRUD table is unformatted



XingPing
  • profile picture
  • Member

Posted 17 June 2016 - 21:43 PM

I'm trying to output a simple table but the resultant layout is unformatted. I don't know why this is happening since the example page of grocery crud is working fine and I'm using their code in my controller as well.

View

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>

<div> <?php echo $output; ?></div>

</body>
</html>

Controller

public function __construct()
{
parent::__construct();

$this->load->database();
$this->load->helper('url');
$this->load->library('grocery_CRUD');
}
public function canteen_main_view()
{

$crud = new grocery_CRUD();

//$crud->set_theme('datatables');
$crud->set_table('item');
$crud->set_subject('Items');
$crud->columns('Name','Price','Category','Photo','Type');

$output = $crud->render();

$this->load->view('Test', $output);


}

Result

fg3E9.png