那篇文章与 Joomla 无关!2.5. 对于初学者,类别视图已经包含元描述和关键字,如果它们存在于view.html.php
if ($this->category->metadesc)
{
$this->document->setDescription($this->category->metadesc);
}
elseif (!$this->category->metadesc && $this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
if ($this->category->metakey)
{
$this->document->setMetadata('keywords', $this->category->metakey);
}
elseif (!$this->category->metakey && $this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
这同样适用于为文章标题添加标题标签的部分:
<?php if ($params->get('show_title')) : ?>
<h2>
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
<a href="<?php echo $this->item->readmore_link; ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h2>
<?php endif; ?>
如果您确实想更改输出的完成方式,您应该在模板中创建模板覆盖。com_content