本文整理汇总了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');
}
示例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');
}
示例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');
}
示例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');
}