Is there any way to find page by id in layout file. I'm currently using $this->fuel->pages->find(5). But its not working. I'm getting following error message
Plugin module can not be found, maybe you forgot to bind it if it's a custom plugin ?
The "find" method should return a page record object. What are you doing with the page record object after you retrieve it?
Running the following should get you the properties you can access: $page = $this->fuel->pages->find(5);
echo '<pre>';
print_r($page->values());
echo '</pre>';
Thanks. I was tried to print_r the $page variable. But how can I get the layout variable for specific page and what are the other function that carried with $page object
Comments
Running the following should get you the properties you can access:
$page = $this->fuel->pages->find(5); echo '<pre>'; print_r($page->values()); echo '</pre>';
http://docs.getfuelcms.com/libraries/my_model#data_record
Specifically, it is a Fuel_page_model data record which extends the Base_module_record class -> Data_record.
$vars = $this->fuel->pagevars->retrieve('my_location');
You can get the current locations variables like so:
$vars = $this->fuel->page->variables();