$crud = new grocery_CRUD();
$crud->set_table('xxx');
$output = $crud->render();
$this->load->view('view', $output);
____________
I want to add
$data['title'] = "Something";
How i can pass $data into view too ??
Thanks thanks thanks!!
⚠ 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. ⚠
Posted 16 January 2012 - 03:58 AM
$crud = new grocery_CRUD();
$crud->set_table('xxx');
$output = $crud->render();
$this->load->view('view', $output);
____________
I want to add
$data['title'] = "Something";
How i can pass $data into view too ??
Posted 16 January 2012 - 07:20 AM
$crud = new grocery_CRUD();
$crud->set_table('xxx');
$output = $crud->render();
$this->load->view('view', $output);
____________
I want to add
$data['title'] = "Something";
How i can pass $data into view too ??
$output = $crud->render();
$output->title = "Something";
$output->meta_keywords = "Something 2";
$this->load->view('view', $output);
$output = $crud->render();
$data['title'] = "Something";
$output = array_merge($data,(array)$output);
$this->load->view('view', $output);
$output = $crud->render();
$data['title'] = "Something";
$output->data = $data;
$this->load->view('view', $output);
Posted 16 January 2012 - 07:22 AM
Posted 16 January 2012 - 07:23 AM
Posted 24 January 2012 - 09:40 AM
Posted 24 January 2012 - 19:28 PM
Posted 24 January 2012 - 22:02 PM
public function example()
{
$this->grocery_crud->set_table('mytable');
$this->grocery_crud->callback_add_field('myfield',array($this,'field_myfield'));
$output = $this->grocery_crud->render();
$this->_example_output($output);
}
// callback function to set the id
function field_myfiield()
{
return '<input name="myfileld" id="myfield" type="text" value=""/>';
}
...
<script>
$(document).ready(function() {
$("input#myfield").autocomplete({
source: [
<?php
$query = $this->db->query("SELECT DISTINCT(myfield) FROM mytable");
foreach ($query->result_array() as $row)
{
echo '"' . $row['myfield'] . '",';
}
?>
]
});
});
</script>
</head>
<body>
...
Posted 25 January 2012 - 06:23 AM
public function example()
{
$this->grocery_crud->set_table('mytable');
$this->grocery_crud->callback_add_field('myfield',array($this,'field_myfield'));
$output = $this->grocery_crud->render();
$results = $this->db->query("SELECT DISTINCT(myfield) FROM mytable")->result_array();
$output->output .= $this->load->view("autocomplete_script.php",array('results' => $results),true); //If the last segment is true , returns the view as a string
$this->_example_output($output);
}
$this->load->view('header.php');
$this->load->view('content.php');
$this->load->view('crud.php');
....
$this->load->view('footer.php');
Posted 25 January 2012 - 22:02 PM
$output->output .= $this->load->view("autocomplete_script.php",array('results' => $results),true); //If the last segment is true , returns the view as a string
Posted 23 June 2012 - 08:07 AM
$output = $crud->render();
$data['title'] = "Something";
$output = array_merge($data,(array)$output);
$this->load->view('view', $output);
$crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->where($row_where, $q_where);
$crud->set_table('volunteers');
$crud->unset_operations();
$crud->columns('profileId', 'name', 'country', 'printDate', 'mail');
$crud->callback_column('name',array($this,'_callback_webpage_url'));
$crud->callback_column('country',array($this,'_callback_languages'));
$crud->display_as('profileId', 'تسلسل')->display_as('name', 'الاسم')->display_as('country', 'البلد')->display_as('printDate', 'تاريخ التسجيل')->display_as('mail', 'البريد الإلكترونى');
$output = $crud->render();
$data['page_title'] = "البØØ« ÙÙ‰ المتطوعين";
$data['my_view'] = "includes/search_volunteer";
$data['css_files'] = array();
$data['js_files'] = array();
$data['output'] = "";
$data['allSkills'] = $this->volunteer_model->getAllSkills();
$data['allLanguages'] = $this->volunteer_model->getAllLanguages();
$output = array_merge($data,(array)$output);
$this->_admin_output($output);
Posted 18 July 2012 - 09:14 AM
$output = $crud->render();
$output->title = "Something";
$output->meta_keywords = "Something 2";
$this->load->view('view', $output);
$output = $crud->render();
$data['title'] = "Something";
$output = array_merge($data,(array)$output);
$this->load->view('view', $output);
$output = $crud->render();
$data['title'] = "Something";
$output->data = $data;
$this->load->view('view', $output);
Posted 10 September 2012 - 06:51 AM
Posted 10 September 2012 - 06:54 AM