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(); }
/** * 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(); }
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); } }