Integrating Tank_Auth library into the template library - howto ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Integrating Tank_Auth library into the template library - howto ? (/showthread.php?tid=48536) |
Integrating Tank_Auth library into the template library - howto ? - El Forum - 01-20-2012 [eluser]Unknown[/eluser] looked around but could't find an example. i'm using the template library: http://williamsconcepts.com/ci/codeigniter/libraries/template/reference.html and would like to integrate the Tank_Auth authentication module to my pages, so to have a login/logout/register form in a $topbar template region i created. Also to be able to control the display of certain regions depending on the log in status. I have tried to do this on the Welcome page Controller, but i'm stuck. getting an error "Unable to load the requested file: Array.php" can anyone lead me in the right direction ? thanks. this is what i have so far Code: class Welcome extends CI_Controller { Integrating Tank_Auth library into the template library - howto ? - El Forum - 05-13-2012 [eluser]Haskabab[/eluser] Hey I use the same library and this is how I integrated Tank Auth: I edited the auth controller and replaced all Code: $this->load->view('viewNameHere', $data); with Code: $this->template->write('title', 'Auth > Login / whatever'); So you should add all the static template regions in the constructor, or add them above the template->render() method. That should work, i did that and everything is working fine! Integrating Tank_Auth library into the template library - howto ? - El Forum - 05-14-2012 [eluser]Unknown[/eluser] thanks a lot, i'll give it a try |