Welcome Guest, Not a member yet? Register   Sign In
Access Assets
#1

Hello
I don't understand..
I have 2 controllers like "Accueil" and "Login"
I call the same "Assets" in the view in a sub directory 'back office/header' 

But when i display accueil (Defaut_controller) css and scripts log correctly, but when i display 'Login' all Assets doesn't find..
See :

File routes :

$route['default_controller'] = 'Accueil';
//$route['login'] = 'Admin/login';
$route['login'] = 'Login';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

File controller "Login"

defined('BASEPATH') OR exit('No direct script access allowed');

class Login extends CI_Controller {

    public function index()
    {
        $this->load->view('backoffice/header');
        $this->load->view('backoffice/nav');
    //  $this->load->view('slider-home');
        
    }

File controller "Accueil"

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Accueil extends CI_Controller {

    public function index()
    {
        $this->load->view('backoffice/header');
        $this->load->view('backoffice/nav');
    //  $this->load->view('slider-home');
        
    }
}

Could you help me why for "Accueil", Css and scripts ok and why then is the same thing doesn't work with "Login" ?

Thanks a lot
Reply
#2

Is the CSS loaded in 'backoffice/header'? If so, please show that file's code.
Reply
#3

If "Accueil" works fine then "Login" will work fine too.

You better go to your browser "Console Log" and check what happens there.
Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB