jeudi 16 juin 2016

Codeigniter - Grocery Crud doesn't load css and jquery?

I'm using Codeigniter + Grocery Crud. So, GC working good but is blank.. shows results from database, but search option and css style doesn't load. My structure is:

  • application
  • assets
  • system

    GC is inside assets.

My controller load view and send output to view:

public function output($output = null) {
    $this->load->view('welcome_message', $output);
}

public function users() {
    $this->load->library('grocery_CRUD');
    $this->output((object) array('output' => '', 'js_files' => array(), 'css_files' => array()));

    try {
        $crud = new grocery_CRUD();

        $crud->set_theme('flexigrid');
        $crud->set_table('suppliers');

        $output = $crud->render();

        $this->output($output);
    } catch (Exception $e) {
        show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
    }

}

After that, i'm using CG official tutorial to include jQuery and CSS files in the view. They are there. When i click over (in view source) - i can see them. It's not problem in folders. I saw in View source double html tags... Is it exist any codeigniter autoload library to do that?

I'm defined autoload helpers - url and utility, which i made for loading assets folder.

I'm supposing the problem is ajax, jquery...but how to fix it?

Aucun commentaire:

Enregistrer un commentaire