I have the same exact code on my production and development servers but I seem to get different array keys when using find('first') to retrieve data.
Development:
Array
(
[Page] => Array
(
[title] => Welcome!
[keywords] => keyword 1 keyword 2 keyword 3
)
)
Production:
Array
(
[0] => Array
(
[title] => Welcome!
[keywords] => keyword 1 keyword 2 keyword 3
)
)
Code in AppController:
//get page title and keywords
$currentPage = $this->Page->find('first',
array(
'conditions' => array('Page.name' => $this->params['controller']),
'fields' => array('Page.title', 'Page.keywords')
));
pr($currentPage);