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