protected function _getMetaTags() { $ret = parent::_getMetaTags(); $row = $this->getData()->parent->row; if ($teaser = $row->teaser) { $ret['description'] = $teaser; } return $ret; }
protected function _getMetaTags() { $ret = parent::_getMetaTags(); $row = $this->_getRow(); if ($row->description) { $ret['description'] = $row->description; } return $ret; }
protected function _getMetaTags() { $ret = parent::_getMetaTags(); $row = $this->_getRow(); if ($row->description) { $ret['description'] = $row->description; } if ($row->og_title) { $ret['og:title'] = $row->og_title; } if ($row->og_description) { $ret['og:description'] = $row->og_description; } if ($row->noindex) { if (isset($ret['robots']) && strpos($ret['robots'], 'noindex') === false) { $ret['robots'] .= ',noindex'; } else { $ret['robots'] = 'noindex'; } } $ret['og:url'] = $this->getData()->getPage()->getAbsoluteUrl(); $c = $this->getData()->parent; while ($c) { if ($c->inherits && Kwc_Abstract::getFlag($c->componentClass, 'subroot') || $c->componentId == 'root') { $metaTags = $c->getChildComponent(array('id' => '-' . $this->getData()->id, 'componentClass' => $this->getData()->componentClass)); if ($metaTags && is_instance_of($metaTags->componentClass, 'Kwc_Box_MetaTagsContent_Component')) { $row = $metaTags->getComponent()->getRow(); if (!isset($ret['og:title']) && $row->og_title) { $title = $this->getData()->getTitle(); //append own title if ($title) { $title .= ' - '; } $ret['og:title'] = $title . $row->og_title; } if (!isset($ret['og:site_name']) && $row->og_site_name) { $ret['og:site_name'] = $row->og_site_name; } } } $c = $c->parent; } return $ret; }
protected function _getMetaTags() { return Kwc_Box_MetaTags_Component::getMetaTagsForData($this->getData()); }
public function injectIntoRenderedHtml($html) { return Kwc_Box_MetaTags_Component::injectMeta($html, $this->getData()->render()); }