當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JDocumentHtml::setMetaData方法代碼示例

本文整理匯總了PHP中JDocumentHtml::setMetaData方法的典型用法代碼示例。如果您正苦於以下問題:PHP JDocumentHtml::setMetaData方法的具體用法?PHP JDocumentHtml::setMetaData怎麽用?PHP JDocumentHtml::setMetaData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JDocumentHtml的用法示例。


在下文中一共展示了JDocumentHtml::setMetaData方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: prepareDocument

 /**
  * Prepare document
  */
 protected function prepareDocument()
 {
     //Escape strings for HTML output
     $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
     // Prepare page heading
     $this->prepearePageHeading();
     // Prepare page heading
     $this->preparePageTitle();
     // Meta Description
     if ($this->params->get('menu-meta_description')) {
         $this->document->setDescription($this->params->get('menu-meta_description'));
     }
     // Meta keywords
     if ($this->params->get('menu-meta_keywords')) {
         $this->document->setMetaData('keywords', $this->params->get('menu-meta_keywords'));
     }
     if ($this->params->get('robots')) {
         $this->document->setMetaData('robots', $this->params->get('robots'));
     }
     // Scripts
     JHtml::_('behavior.tooltip');
     JHtml::_('Prism.ui.pnotify');
     JHtml::_('Prism.ui.joomlaHelper');
     $this->document->addScript('media/' . $this->option . '/js/site/' . JString::strtolower($this->getName()) . '.js');
 }
開發者ID:ITPrism,項目名稱:SocialCommunityDistribution,代碼行數:28,代碼來源:view.html.php

示例2: prepareDocument

 /**
  * Prepare the document
  */
 protected function prepareDocument()
 {
     // Escape strings for HTML output
     $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
     // Prepare page heading
     $this->preparePageHeading();
     // Prepare page heading
     $this->preparePageTitle();
     if ($this->params->get('menu-meta_description')) {
         $this->document->setDescription($this->params->get('menu-meta_description'));
     } else {
         $this->document->setDescription(JText::sprintf('COM_CROWDFUNDING_MAIL_TO_FRIEND_META_DESC_S', $this->item->title));
     }
     if ($this->params->get('menu-meta_keywords')) {
         $this->document->setMetaData('keywords', $this->params->get('menu-meta_keywords'));
     }
     if ($this->params->get('robots')) {
         $this->document->setMetaData('robots', $this->params->get('robots'));
     }
     // Breadcrumb
     $pathway = $this->app->getPathway();
     $currentBreadcrumb = JHtmlString::truncate($this->item->title, 16);
     $pathway->addItem($currentBreadcrumb, '');
     // Add scripts
     JHtml::_('jquery.framework');
     JHtml::_('behavior.tooltip');
     JHtml::_('behavior.formvalidation');
 }
開發者ID:ITPrism,項目名稱:CrowdfundingDistribution,代碼行數:31,代碼來源:view.html.php

示例3: prepareDocument

 /**
  * Prepare the document
  */
 protected function prepareDocument()
 {
     $app = JFactory::getApplication();
     /** @var $app JApplicationSite */
     // Escape strings for HTML output
     $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
     // Prepare page heading
     $this->preparePageHeading();
     // Prepare page heading
     $this->preparePageTitle();
     if ($this->params->get('menu-meta_description')) {
         $this->document->setDescription($this->params->get('menu-meta_description'));
     } else {
         if (!$this->item) {
             $metaDescription = JText::_('COM_CROWDFUNDING_REPORT_CAMPAIGN');
         } else {
             $metaDescription = JText::sprintf('COM_CROWDFUNDING_REPORT_S', $this->item->title);
         }
         $this->document->setDescription($metaDescription);
     }
     if ($this->params->get('menu-meta_keywords')) {
         $this->document->setMetaData('keywords', $this->params->get('menu-meta_keywords'));
     }
     if ($this->params->get('robots')) {
         $this->document->setMetaData('robots', $this->params->get('robots'));
     }
     // Breadcrumb
     $pathway = $app->getPathway();
     $currentBreadcrumb = !$this->item ? JText::_('COM_CROWDFUNDING_REPORT_CAMPAIGN') : JHtmlString::truncate($this->item->title, 16);
     $pathway->addItem($currentBreadcrumb, '');
     // Add scripts
     JHtml::_('jquery.framework');
     JHtml::_('prism.ui.bootstrapMaxlength');
     JHtml::_('prism.ui.bootstrap3Typeahead');
     $this->document->addScript('media/' . $this->option . '/js/site/report.js');
 }
開發者ID:bellodox,項目名稱:CrowdFunding,代碼行數:39,代碼來源:view.html.php

示例4: prepareDocument

 /**
  * Prepares the document
  */
 protected function prepareDocument()
 {
     $app = JFactory::getApplication();
     /** @var $app JApplicationSite */
     // Prepare page suffix
     $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
     // Prepare page heading
     $this->preparePageHeading();
     // Prepare page heading
     $this->preparePageTitle();
     // Meta Description
     $this->document->setDescription($this->params->get('menu-meta_description'));
     // Meta keywords
     $this->document->setMetaData('keywords', $this->params->get('menu-meta_keywords'));
     // Add current layout into breadcrumbs
     $pathway = $app->getPathway();
     $pathway->addItem(JText::_('COM_USERIDEAS_PATHWAY_FORM_TITLE'));
     // Scripts
     JHtml::_('behavior.keepalive');
     JHtml::_('jquery.framework');
     JHtml::_('Prism.ui.pnotify');
 }
開發者ID:bellodox,項目名稱:UserIdeas,代碼行數:25,代碼來源:view.html.php


注:本文中的JDocumentHtml::setMetaData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。