本文整理匯總了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();
}