Can I embed CodeIgniter Helpers in subdirectories?

I know that I can embed libraries in subfolders, but can I do the same for helpers?

The end result will be what matters:

application/helpers/foo/bar_helper.php application/helpers/baz_helper.php 

Then call the helpers with:

 $this->load->helper('foo/bar'); $this->load->helper('baz'); 
+4
source share
1 answer

Yes, you can store and load as follows (verified)

 $this->load->helper('myHelperSubFolder/myHelperName'); 

Even in autoload.php you can load the helper as follows

 $autoload['helper'] = array('url','myHelpers/functions_helper'); // 'myHelpers' is the folder inside my helper folder and 'functions_helper' is my helper file. 
+5
source

All Articles