I’m getting this error
Unable to load the requested file: nesto.phpwhen am trying this code
$this->load->view('nesto', $this->_data);this is my dir stricture http://twitpic.com/qvgys
Can anyone tell me what am doing wrong?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
February 20, 2008 12:02am
Subscribe [6]#106 / Nov 25, 2009 10:52am
I’m getting this error
Unable to load the requested file: nesto.phpwhen am trying this code
$this->load->view('nesto', $this->_data);this is my dir stricture http://twitpic.com/qvgys
Can anyone tell me what am doing wrong?
#107 / Mar 10, 2011 11:12am
Hello,
i’m trying to use the controller variables in the view (as I do in the CI 2.0 basic installation) with the HMVC extensions.
Controller:
class MY_Controller extends MX_Controller{
var $table;
function __construct()
{
parent::__construct();
$this->table = "foo";View:
<?php echo $this->table ?>This simply doesn’t work. Any suggestion is highly appreciated.
Thank you
Filippo
#108 / Mar 17, 2011 12:09am
removed
#109 / Mar 17, 2011 6:46am
Hi all,
i’d like to clarify that my problem arises only when the HMVC extensions are installed. on CI2.0 I can normally use controller variables in the view. after HMVC I can’t.
So, if not depending on something I did, this is an HMVC issue.
Regards,
Filippo
#110 / Mar 17, 2011 7:02am
The object represented by “$this” in a view is actually the CI_Loader object not the CI_Controller. The CI core objects are assigned to the Loader when your view is loaded. This is a coding problem because there may be more than one controller in existence at any time, references to variables in the view will be to the CI core objects.
EDIT:
I have updated Modular Extensions HMVC on bitbucket to allow $this->variable in a view to reference the current module controller.
However it is far better practice to pass variables to your views as recommended and detailed in the CodeIgniter User Guide.
#111 / Mar 17, 2011 7:54am
hi, wiredesignz
i encounter some problem in HMVC, only in some circumstances.
here the link http://ellislab.com/forums/viewthread/121820/P290/#869780
😉
#112 / Mar 17, 2011 8:15am
Replied in the other thread.
#113 / Jul 26, 2012 6:27am
Hi, is this compatible w/ the latest version of CodeIgniter? And is this extension supported by the dev until now? I’m interested in using this. Thanks in advance for replies 😊