当前位置: 首页>>代码示例>>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;未经允许,请勿转载。