Welcome Guest, Not a member yet? Register   Sign In
Simple HMVC
#18

(10-30-2015, 02:10 AM)Sentro Wrote: Awesome, pretty much what i was looking for. Simple and straight forward. I'll let you know if i think of any improvements or stuff to add.

Nice to hear that Big Grin

Here is a little extra method for the MY_Loader class
PHP Code:
/**
 * Set a custom path for view files
 * 
 * @param string $path
 * @param bool $view_cascade
 */
 
public function custom_view_path($path$view_cascade TRUE) {
 
    if( ! array_key_exists($path$this->_ci_view_paths) ) {
 
        $this->_ci_view_paths = array($path => $view_cascade) + $this->_ci_view_paths;
 
    }
 } 
It's almost the same as the library_view method, only the difference is that you pass an absolute path to this method. So now any location within your project could hold view files
Reply


Messages In This Thread
Simple HMVC - by Martin7483 - 09-23-2015, 03:46 AM
RE: Simple HMVC - by Martin7483 - 09-24-2015, 02:41 AM
RE: Simple HMVC - by skunkbad - 09-24-2015, 01:35 PM
RE: Simple HMVC - by Martin7483 - 09-24-2015, 11:02 PM
RE: Simple HMVC - by Martin7483 - 09-25-2015, 02:15 AM
RE: Simple HMVC - by kenjis - 09-25-2015, 05:04 AM
RE: Simple HMVC - by Martin7483 - 09-25-2015, 05:10 AM
RE: Simple HMVC - by mwhitney - 09-25-2015, 06:54 AM
RE: Simple HMVC - by Martin7483 - 09-25-2015, 06:59 AM
RE: Simple HMVC - by kilishan - 09-25-2015, 07:08 AM
RE: Simple HMVC - by Martin7483 - 09-25-2015, 07:20 AM
RE: Simple HMVC - by Martin7483 - 10-15-2015, 04:24 AM
RE: Simple HMVC - by nasser.man - 10-15-2015, 12:13 PM
RE: Simple HMVC - by Martin7483 - 10-16-2015, 01:54 AM
RE: Simple HMVC - by Sentro - 10-30-2015, 01:37 AM
RE: Simple HMVC - by Martin7483 - 10-30-2015, 01:48 AM
RE: Simple HMVC - by Sentro - 10-30-2015, 02:10 AM
RE: Simple HMVC - by Martin7483 - 10-30-2015, 02:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB