public function beforeRender()
 {
     parent::beforeRender();
     if ($this->request->params['admin']) {
         return;
     }
     if (!empty($this->viewVars['category'])) {
         $this->set('title_for_layout', $this->viewVars['category']['GlobalCategory']['title']);
         $canonicalUrl = $this->Event->trigger('Contents.slugUrl', array('type' => 'category', 'data' => array('GlobalCategory' => $this->viewVars['category']['GlobalCategory'])));
         $this->set('seoCanonicalUrl', $canonicalUrl['slugUrl']['Contents']);
         Configure::write('Website.description', $this->viewVars['category']['GlobalCategory']['meta_description']);
         Configure::write('Website.keywords', $this->viewVars['category']['GlobalCategory']['meta_keywords']);
         return;
     }
     if (Configure::read('Contents.GlobalCagegories')) {
         Configure::write('Website.description', Configure::read('Contents.GlobalCagegories.description'));
         Configure::write('Website.keywords', Configure::read('Contents.GlobalCagegories.keywords'));
     }
     $this->set('title_for_layout', __d('contents', 'Content Categories'));
     $this->set('seoContentIndex', Configure::read(sprintf('Contents.GlobalCagegories.robots.%s.index', $this->request->params['action'])));
     $this->set('seoContentFollow', Configure::read(sprintf('Contents.GlobalCagegories.robots.%s.follow', $this->request->params['action'])));
 }
 /**
  * Its pointless trying to use a wysiwyg here, so we will just put if off
  * completely for the layouts.
  */
 public function beforeRender()
 {
     parent::beforeRender();
     Configure::write('Wysiwyg.editor', 'text');
 }