Welcome Guest, Not a member yet? Register   Sign In
cms and hmvc problem
#1

[eluser]Shiva666[/eluser]
I'm busy with doing a tutorial on creating a cms and I'm trying to put that tutorial in an hmvc structure and I have ran into a problem.

I have these errors
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined variable: subview

Filename: views/_layout_modal.php

Line Number: 8

Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined variable: _ci_file

Filename: MX/Loader.php

Line Number: 309

Quote:An Error Was Encountered

Unable to load the requested file:

with the first error it is being defined in the user controller of the users module.

Here is the users controller
Code:
<?php

class Users extends Admin_Controller {

function __construct() {
  parent::__construct();
}

public function login(){
  
$this->data['subview'] = 'login';
$this->load->module('templates');
        $this->templates->_layout_modal();
}
}

This is the _layout_modal view
Code:
<?php $this->load->view('page_head'); ?>

<body  #555">
<div class="modal-dialog" >
  <div class="modal-content">
               &lt;?php $this->load->view($subview); ?&gt;
   &copy; &lt;?php echo $meta_title; ?&gt;
  </div>
</div>
&lt;/body&gt;

&lt;?php $this->load->view('page_tail'); ?&gt;

and this is the templates controller
Code:
&lt;?php

class Templates extends Admin_Controller {

function __construct() {
  parent::__construct();

}

public function main(){
  $this->load->view('_layout_main', $this->data);
}

public function modal(){
  
  $this->load->view('_layout_modal', $this->data);
}
}

Let me know if there is anything else you need


Messages In This Thread
cms and hmvc problem - by El Forum - 12-06-2013, 06:29 AM
cms and hmvc problem - by El Forum - 01-07-2014, 03:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB