ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Codeigniter + twitter bootstrap + html5boilerplate + MY_Controller

March 09, 2012 5:16am

Subscribe [9]
  • #16 / Nov 14, 2012 5:26am

    Go-Trex

    21 posts

    Hi Coob,

    I am also a user of this extension of the CI_Controller. I have made some modifications/improvements in the past for own use. One of the modifications was integration with tank_auth in the boilerplates as default.

    In nav.php you can alter the code to show a login form when the user is not logged in. You can check this with the function you mentioned above

    $this->tank_auth_>is_logged_in()

    . If this returns FALSE then you can show the login form, otherwise you can show the navigation links for example.

    nav.php

    <?php
    
    if($this->tank_auth->is_logged_in())
    {
        // show navigation links
        echo anchor(base_url(), 'Home');
        echo anchor('admin', 'Admin area');
    }
    else
    {
        // show login form
        echo form_open();
        ....
    }

    Make sure that the tank_auth library is autoloaded since you will be using the library on every page of your website.

  • #17 / Sep 03, 2013 7:01am

    bibos

    11 posts

    Hi,
    Great work man, i’m going to start a new project based on your skeleton, but i have a question what is : $renderData?

    And can you give an exemple on how to use it?

    Thanks Man.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases