Welcome Guest, Not a member yet? Register   Sign In
How to make custom helper work.
#10

[eluser]noideawhattotypehere[/eluser]
application/core/MY_Loader.php
Code:
class MY_Loader extends CI_Loader {

    public function __construct() {
        parent::__construct();
    }
    
    function array_to_view($views) {
        foreach ($views as $single_view) {
            parent::view('theme/default/template/common/'.$single_view.'.tpl');
        }
    }

}

usage
Code:
$views = array('header', 'column_left', 'footer');
$this->load->array_to_view($views);


Messages In This Thread
How to make custom helper work. - by El Forum - 01-19-2014, 07:22 AM
How to make custom helper work. - by El Forum - 01-19-2014, 08:41 AM
How to make custom helper work. - by El Forum - 01-19-2014, 08:53 AM
How to make custom helper work. - by El Forum - 01-19-2014, 10:26 AM
How to make custom helper work. - by El Forum - 01-19-2014, 10:08 PM
How to make custom helper work. - by El Forum - 01-20-2014, 02:37 AM
How to make custom helper work. - by El Forum - 01-20-2014, 02:58 AM
How to make custom helper work. - by El Forum - 01-20-2014, 03:22 AM
How to make custom helper work. - by El Forum - 01-20-2014, 03:38 AM
How to make custom helper work. - by El Forum - 01-20-2014, 03:55 AM
How to make custom helper work. - by El Forum - 01-20-2014, 04:13 AM
How to make custom helper work. - by El Forum - 01-20-2014, 05:44 AM
How to make custom helper work. - by El Forum - 01-20-2014, 06:21 AM
How to make custom helper work. - by El Forum - 01-20-2014, 08:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB