public function beforeRender() { $this->AppMetaTags->set('og:site_name', AppController::NAME); $this->AppMetaTags->set('og:url', Router::url()); $this->AppMetaTags->set('og:title', $this->controller->data->get('pageTitle')); return parent::beforeRender(); }
public function beforeRender() { if (!$this->Session->isEmpty($this->sessionVarname)) { $this->controller->data->set('flashMessage', $this->Session->get($this->sessionVarname)); $this->reset(); } return parent::beforeRender(); }