Loading views in the HMVC encoder does not work

I am trying to load a view from a second controller view in my first controller, but it gives an error that the view cannot be found even if it exists.

Example
Module → music
Views → new → file1.php
Views → old → file2.php

Controller → new.php

Inside new.php, I use the index () function and try to load the view

     $this->load->view('old/file2.php');

As you can see, I am trying to load the file2 view (this is from another controller) from the new controller , but it does not want to display.

+3
source share
1 answer

sure you need to add the module name:

$this->load->view('music/old/file2');

must do it.

+11
source

Source: https://habr.com/ru/post/1784869/


All Articles