Помогите с Н1

Автор proh, 10-06-2011, 14:52:21

« назад - далее »

prohTopic starter

Прописал в движке джумлы заголовок Н1 для статей.
Но вот недавно установил новый шаблон...
В файле functions.php:
    artxFragmentBegin("<h2 class=\"art-postheader\"> ");
    artxFragmentBegin("");
    if (isset($data['header-text']) && strlen($data['header-text'])) {
    if (isset($data['header-link']) && strlen($data['header-link']))
    artxFragmentContent('<a href="' . $data['header-link'] . '" class="PostHeader">' . $data['header-text'] . '</a>');
    else
    artxFragmentContent($data['header-text']);
    }
    artxFragmentEnd("\r\n");
    artxFragmentEnd("</h2>\r\n");

Тут заголовок Н2 прописан для всех заголовков.

Содержимое файла templates/*** стиль****/html/com_content/article/default.php :
<?php
defined
('_JEXEC') or die;

require_once 
dirname(__FILE__) . str_replace('/'DIRECTORY_SEPARATOR'/../../../functions.php');

// Create component view for Joomla! 1.5 or 1.6.
// The classes are defined in ../../../functions.php file and encapsulate 
// version-specific queries and formatting.
if ($GLOBALS['version']->RELEASE == '1.6') {
    
$component = new ArtxContent16($this$this->params);
    
$article $component->article($this->item$this->print);
    
JHtml::addIncludePath(JPATH_COMPONENT DS 'helpers');
} else {
    
$component = new ArtxContent15($this$this->params);
    
$article $component->article($this->article$this->print);
}


echo 
$component->beginPageContainer('item-page');
if (
$component->showPageHeading && $article->title != $component->pageHeading)
    echo 
$component->pageHeading();
$params $article->getArticleViewParameters();
if (
$article->titleVisible) {
    
$params['header-text'] = $this->escape($article->title);
    if (
strlen($article->titleLink))
        
$params['header-link'] = $article->titleLink;
}
// Change the order of "if" statements to change the order of article metadata header items.
if ($article->showCreateDate)
    
$params['metadata-header-icons'][] = JHTML::_('image.site''postdateicon.png'nullnullnullJText::_("postdateicon"), array('width' => '17''height' => '18''class' => 'art-metadata-icon')) . $article->createDateInfo();
if (
$article->showModifyDate)
    
$params['metadata-header-icons'][] = JHTML::_('image.site''postdateicon.png'nullnullnullJText::_("postdateicon"), array('width' => '17''height' => '18''class' => 'art-metadata-icon')) . $article->modifyDateInfo();
if (
$article->showPublishDate)
    
$params['metadata-header-icons'][] = JHTML::_('image.site''postdateicon.png'nullnullnullJText::_("postdateicon"), array('width' => '17''height' => '18''class' => 'art-metadata-icon')) . $article->publishDateInfo();
if (
$article->showAuthor)
    
$params['metadata-header-icons'][] = JHTML::_('image.site''postauthoricon.png'nullnullnullJText::_("postauthoricon"), array('width' => '14''height' => '14''class' => 'art-metadata-icon')) . $article->authorInfo();
if (!
$article->print && $article->showPdfIcon)
    
$params['metadata-header-icons'][] = $article->pdfIcon();
if (
$article->showPrintIcon)
    
$params['metadata-header-icons'][] = $article->print $article->printScreenIcon() : $article->printPopupIcon();
if (
$article->showEmailIcon)
    
$params['metadata-header-icons'][] = $article->emailIcon();
if (!
$article->print && $article->canEdit)
    
$params['metadata-header-icons'][] = $article->editIcon();
if (
$article->showHits && $article->hits)
    
$params['metadata-header-icons'][] = $article->hitsInfo();
if (
$article->showUrl)
    
$params['metadata-header-icons'][] = $article->urlInfo();
// Build article content
$content '';
if (!
$article->showIntro)
    
$content .= $article->event('afterDisplayTitle');
$content .= $article->event('beforeDisplayContent');
$content .= $article->content();
$content .= $article->event('afterDisplayContent');
$params['content'] = $content;
// Change the order of "if" statements to change the order of article metadata footer items.
if ($article->showParentCategory || $article->showCategory)
  
$params['metadata-footer-icons'][] = JHTML::_('image.site''postcategoryicon.png'nullnullnullJText::_("postcategoryicon"), array('width' => '18''height' => '18''class' => 'art-metadata-icon')) . $article->categories();
// Render article
echo $article->article($params);
echo 
$component->endPageContainer();

Подскажите, как сделать, чтобы заголовок h1 был только при просмотре статьи?
Спасибо!


Владимир75

Услуги: Сайты в топ за две неделм Мобильный, WatsApp., Viber +79964788889, telegram @xiceer.
  •  



Владимир75

Цитата: proh от 10-06-2011, 15:09:13
Там я ответа на свой вопрос не нашел
Там есть ответ на вопрос , выберите раздел сео и джумла.
Услуги: Сайты в топ за две неделм Мобильный, WatsApp., Viber +79964788889, telegram @xiceer.
  •  

prohTopic starter

Во-первых, у меня Joomla! 1.6;
Во-вторых, мне эти инструкции не помогли.
Прочитайте внимательно первый пост.