Edit Page Issue |
[eluser]jzmwebdevelopement[/eluser]
Hello, I am getting the following error when I try and access: domain.co.nz/admin/editpage/home I get the following error: Code: PHP Fatal error: Call to a member function getCMSPage() on a non-object in controllers/home.php on line 22 The issue with this is that I cannot understand why it is being passed back into the main "home" controller - which is the main controller Ideal Situation What I am trying to do with this is load the content into a text area on for editing and when submit is clicked I would like it to go back to the same page with a message saying content updated. Admin Template Code: <li><?php echo anchor('#','Edit Pages');?> Page Model Code: function updatePage($data){ View: Code: <?php Controller: Code: function index(){
[eluser]toopay[/eluser]
load the model first! Code: $this->load->model('navigation_model');
[eluser]jzmwebdevelopement[/eluser]
[quote author="toopay" date="1303194919"]load the model first! Code: $this->load->model('navigation_model'); It is already auto loaded http://cl.ly/2U1F3a2B0s2K0i3k3g13
[eluser]jzmwebdevelopement[/eluser]
Here is my navigation_model: It works fine on other pages just not this one. Code: class Navigation_model extends CI_Model {
[eluser]jzmwebdevelopement[/eluser]
Navigation Controller Code: class Navigation extends CI_Controller {
[eluser]toopay[/eluser]
just to make sure, lets disable autoload, and load the model manually right before you call it's function.
[eluser]toopay[/eluser]
[quote author="jzmwebdevelopement" date="1303191727"] I get the following error: Code: PHP Fatal error: Call to a member function getCMSPage() on a non-object in controllers/home.php on line 22 i've just noticed, the error is in your home controller! Post it here. |
Welcome Guest, Not a member yet? Register Sign In |