PAGES
|
|_id
|_title
|_content
|_meta_title
|_meta_description
PAGES_LANG
|
|_id
|_lang_code
|_field_id
|_title
|_content
|_meta_title
|_meta_description
Controller
function pages() {
$crud = new grocery_CRUD();
$crud->set_subject('Page') ->unset_delete();
if ($this->db->table_exists('pages_lang')) {
// Get languages from db
foreach($this->db_languages as $lang){
//default is the default language
if($lang->default != '1') //
{
$crud->add_action($lang->title, asset_url('images/'.$lang->code.'.png','marita'),'back/pages_lang/edit');
}
}
}
$this->template->build('admin/grocery_crud', $crud->render());
The pic shows my "pages" db table. The flags is actions...
Can anyone could tell my how to link each flag to my "pages_lang" db table and edit the selected row with the lang_code field related?
I don't know. Tell a idea..
Thanks