本文整理匯總了PHP中GWF_Website::addMeta方法的典型用法代碼示例。如果您正苦於以下問題:PHP GWF_Website::addMeta方法的具體用法?PHP GWF_Website::addMeta怎麽用?PHP GWF_Website::addMeta使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GWF_Website
的用法示例。
在下文中一共展示了GWF_Website::addMeta方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: showPage
public function showPage(GWF_Page $page)
{
$page->increase('page_views', 1);
$robot = $page->isOptionEnabled(GWF_PAGE::INDEXED) ? 'index,' : 'noindex,';
$robot .= $page->isOptionEnabled(GWF_PAGE::FOLLOW) ? 'follow' : 'nofollow';
GWF_Website::addMeta(array('robots', $robot, 0), true);
GWF_Website::setMetaDescr($page->getVar('page_meta_desc'));
GWF_Website::setMetaTags($page->getVar('page_meta_tags'));
GWF_Website::setPageTitle($page->getVar('page_title'));
GWF_Website::addInlineCSS($page->getVar('page_inline_css'));
$translations = $this->getPageTranslations($page);
$user = GWF_User::getStaticOrGuest();
$tVars = array('page' => $page, 'page_views' => $page->getVar('page_views'), 'title' => $page->display('page_title'), 'author' => $page->display('page_author_name'), 'created' => GWF_Time::displayDate($page->getVar('page_create_date')), 'modified' => GWF_Time::displayDate($page->getVar('page_date')), 'content' => $this->getPageContent($page), 'comments' => $this->getPageComments($page), 'form_reply' => $this->getPageCommentsForm($page), 'pagemenu' => $this->getPagemenuComments($page), 'translations' => $translations, 'trans_string' => $this->getPageTranslationsString($page, $translations), 'similar' => $this->getSimilarPages($page), 'edit_permission' => $page->isOwner($user) || $this->module->isAuthor($user));
return $this->module->template('show_page.tpl', $tVars);
}