Example #1
0
 public function _prepareLayout()
 {
     $brand = $this->getBrand();
     $pageMainTitle = $this->getLayout()->getBlock('page.main.title');
     if ($pageMainTitle) {
         $pageMainTitle->setPageTitle($brand->getName());
     }
     $this->pageConfig->getTitle()->set($brand->getTitle());
     $this->pageConfig->setKeywords($brand->getTitle());
     $this->pageConfig->setDescription($brand->getTitle());
     return parent::_prepareLayout();
 }
Example #2
0
 /**
  * Prepare global layout
  *
  * @return $this
  */
 protected function _prepareLayout()
 {
     $page = $this->getPage();
     $this->_addBreadcrumbs($page);
     $this->pageConfig->addBodyClass('cms-' . $page->getIdentifier());
     $this->pageConfig->getTitle()->set($page->getTitle());
     $this->pageConfig->setKeywords($page->getMetaKeywords());
     $this->pageConfig->setDescription($page->getMetaDescription());
     $pageMainTitle = $this->getLayout()->getBlock('page.main.title');
     if ($pageMainTitle) {
         // Setting empty page title if content heading is absent
         $cmsTitle = $page->getContentHeading() ?: ' ';
         $pageMainTitle->setPageTitle($this->escapeHtml($cmsTitle));
     }
     return parent::_prepareLayout();
 }
Example #3
0
 public function testKeywords()
 {
     $keywords = 'test_keywords';
     $this->model->setKeywords($keywords);
     $this->assertEquals($keywords, $this->model->getKeywords());
 }
 /**
  * {@inheritdoc}
  */
 public function setKeywords($keywords)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setKeywords');
     if (!$pluginInfo) {
         return parent::setKeywords($keywords);
     } else {
         return $this->___callPlugins('setKeywords', func_get_args(), $pluginInfo);
     }
 }