本文整理汇总了PHP中Page_Controller::MetaTags方法的典型用法代码示例。如果您正苦于以下问题:PHP Page_Controller::MetaTags方法的具体用法?PHP Page_Controller::MetaTags怎么用?PHP Page_Controller::MetaTags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Page_Controller
的用法示例。
在下文中一共展示了Page_Controller::MetaTags方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DetailViewProductMetaTags
/**
* 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 <rlehmann@pixeltricks.de>,
* Sebastian Diel <sdiel@pixeltricks.de>
* @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;
}
示例2: MetaTags
public function MetaTags()
{
$tags = parent::MetaTags();
return $tags;
}
示例3: MetaTags
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();
}