Template controller doesn't show the desings in Fuelphp

51 views Asked by At

I got a fuel php project from my client. i see the code of fuel php and i understand the working of that project then i want to create a page and link with exist template into my controller page. I am create a page controller and view page also, when i view my page from controller is working fine but when i use my current template of my code is not working. I am shareing the both codes with you below.

Previous code from Project: class Controller_Public_Aboutus extends Controller_Public {

public function action_index($lang = null)
{
$current_language = parent::before();

$data['aboutus'] = Model_About_Aboutustr::find('all', array(
'where' => array(array('language_id', $current_language)
    )
   )
);

$this->template->title = "About us";
$this->template->content = View::forge('public/aboutus/index', $data);
}

}

Mycode: class Controller_Public_Askanexpert extends Controller_Template {

public function action_index()
{
   $data= array();
    $this->template->title = "Ask an";
    $this->template->content=View::forge('public/askanexpert/index');
}

}

Existing code are able to access current template but my code is not able to accessing the template. Please if any expert in FuelPHP, please help me to solve this problem.

0

There are 0 answers