How to load view from a different folder and pass it to the required view in codeigniter

I have installed the tank_auth to help me out in the login but I’m using codeigniter for the first time. I have loaded the library and called the view as follows in the main controller:

public function index()

    $data['login_form'] = $this->load->view('auth/login_form', NULL, TRUE);

    $data['post'] = $this->posts->get_post();        


Then I wanted to load the setup as offered by tank_auth, but on the UI that I have made on the login page. But for some reason it doesn’t work and I just get a blank page. “auth” is a folder in the views directory where other view(xyz.php) files are stored. How can I solve this and use the same tank_auth library in the UI and views that I have created?

this is the code that I was using as reference

Source: php

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.