Welcome Guest, Not a member yet? Register   Sign In
CI with Bootstrap template and Ion Auth
#1

[eluser]Unknown[/eluser]
I'm trying to include Ion Auth in a Bootstrap template with Codeigniter. But I cant get it to work properly.

I'm pretty new with CI so maybe someone can help me on this one?

My auth.php controller files calls template files like this:

Code:
$this->_render_page('auth/login', $this->data);

Now i want to include this in my template as 'content' like this:

Code:
$this->load->view('template/user', array("content" => $this->_render_page('auth/login',$this->data array())));

But his doesn't work, it places the auth/login page above my template/user view. does anyone know how to solve this?

It would help me a lot
#2

[eluser]Unknown[/eluser]
Code:
function _render_page($view, $data = null, $render = false)
    {
        $this->data = (empty($data)) ? $this->data : $data;
        $this->data['view'] = $view;
        $view_html = $this->load->view('template/user', $this->$data, $render);
        if (!$render) return $view_html;
    }

try adjusting the _render_page function to load your template page and pass the auth view as a variable in $this->data




Theme © iAndrew 2016 - Forum software by © MyBB