/** * Because of a url rule defined for this page type in the _config.php, the function MetaTags does not work anymore. * This function overloads it and parses the meta data attributes of SilvercartProduct * * @param boolean $includeTitle should the title tag be parsed? * * @return string with all meta tags * @author Roland Lehmann <*****@*****.**>, * Sebastian Diel <*****@*****.**> * @since 19.06.2013 */ protected function DetailViewProductMetaTags($includeTitle = false) { $canonicalTag = ''; if ($this->isProductDetailView()) { $product = $this->getDetailViewProduct(); $this->MetaKeywords = $product->MetaKeywords; $this->MetaDescription = $product->MetaDescription; $this->dataRecord->MetaKeywords = $product->MetaKeywords; $this->dataRecord->MetaDescription = $product->MetaDescription; if ($product->IsMirroredView()) { $canonicalTag = sprintf('<link rel="canonical" href="%s"/>' . "\n", $product->CanonicalLink()); } } $tags = parent::MetaTags($includeTitle); $tags .= $canonicalTag; return $tags; }
public function MetaTags() { $tags = parent::MetaTags(); return $tags; }
public function MetaTags() { $page = $this->request->param('Page'); $id = $this->request->param('ID'); $summit = Summit::get()->filter('Slug', $page)->first(); if ($summit && $id) { $video = PresentationVideo::get()->filter(['Presentation.Slug' => $id, 'DisplayOnSite' => true, 'Processed' => true])->first(); if (!is_null($video)) { return $video->MetaTags(); } else { return parent::MetaTags(); } } return parent::MetaTags(); }