How to make custom helper work. |
[eluser]razerone[/eluser]
[quote author="Tpojka" date="1390152364"]You can try something such as CI native using of third parameter set to true in $this->load->view('template', $arr, true); function of your controller method. Check documentation (last line). Also, you can define it in APPPATH . '/core/' . MY_Controller.php. After that you can use it in any controller that is extending MY_Controller: Code: <?php (defined('BASEPATH')) OR exit('No direct script access allowed'); Now in your controller you can use variables $this->header and $this->column_left. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); You gave answer to yourself already: if you want to get some data(output, view, what else) typing header, you have to define somewhere in code what header should return. PHP nor CI don't read minds (yet ). edit: I fixed quote signs in MY_Controller.php code[/quote] tried that way did not work. Only echoed out errors. |
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
|