Welcome Guest, Not a member yet? Register   Sign In
Call to a member function render() on a non-object
#1

[eluser]sooner[/eluser]
I am trying to use the $this->template->render() to output the view.But i am getting this error "Call to a member function render() on a non-object". I think it is not recognizing the template class. Can any one suggest me how to solve it.

Thx
#2

[eluser]developer10[/eluser]
You should autoload template library (application/config/autoload.php)

Also, you should already have placed template.php file in your system/libraries directory
#3

[eluser]phpserver[/eluser]
Code:
$this->template->render('folder/page_name');
or

Code:
$this->template->render('page_name');
#4

[eluser]sooner[/eluser]
In autoload config file i added the template library file..it worked..thx




Theme © iAndrew 2016 - Forum software by © MyBB