fuel_var not working when calling a page from controller
I have a page _layouts/terms. I created the corresponding page from admin and added some content to it. I am trying to load it from a controller the following way
$this->data['content']='_layouts/terms';
$this->data['username']=$this->session->userdata('username');
$this->load->view('_layouts/main', $this->data);
In the terms.php I have specified the fuel variable
echo fuel_var('body', '');
The text I entered through admin is not there when accessed through controller. But during preview, it comes with added content. Is there anything I am missing here.
Comments
http://www.getfuelcms.com/user_guide/general/creating-pages#controller
I am wondering whether I can implement the pagevariables_model that way in my view to directly access the CMS data. Please let me know if it is possible?
fuel_set_var('my_var', 'my_value')