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

[eluser]razerone[/eluser]
[quote author="noideawhattotypehere" date="1390215322"]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);
[/quote]

I have all ready one that just doesn't let me echo <?php echo $header in view;?>

I am looking in to some link like this now $data['header'] = $this->load->controller('common/header'); for controller


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