Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • jdwilsonjr Friend
    #164957

    Using joomla 1.6 and latest version of ja_t3_blank.

    How can we set the article title to use the seo preferred h1 tag instead of the h2 tag.

    Thanks.

    chavan Friend
    #395269

    you can change it in this File

    componentscom_contentviewsarticletmpldefault.php


    <?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; ?>

    Note: If you Find my Post useful please click on the Thanks Icon

    chavan Friend
    #395638

    Solution 1:
    You create folders as follow:
    ja_t3_bank/html/com_content/article/
    And copy files from folder plugins/system/jat3/jat3/base-themes/default/html/com_content/article/
    After that you can change code in ja_t3_bank/html/com_content/article/default.php


    <?php if ($params->get('show_title')) : ?>
    <span>chang tag h2</span><!-- just test -->
    <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; ?>

    NOTE: Clear ja_t3_cache before refresh front-end page.

    Solution 2:
    Create a theme in local/themes/<name theme>
    Create folders localhost/themes/<name theme>/html/com_content/article
    Copy files from folder plugins/system/jat3/jat3/base-themes/default/html/com_content/article/
    And change code file default.php of localhost/themes/<name theme>/html/com_content/article folder.

    Access to your admin site
    Edit template ja_t3_blank
    In PROFILES tab at Theme settings session, you add new theme as attached image.
    Save settings and refresh your front-end page.

    jdwilsonjr Friend
    #402777

    Chavan,

    So sorry as again, this does not entirely make sense to me. I see the file that you reference and in your instructions you say …

    <blockquote>you can change it in this File</blockquote>

    Honestly, what is “it” ?

    Especially when a slight expansion of that file reveals both h1 and h2 are present as follows:

    21 <?php if ($this->params->get(‘show_page_heading’, 1)) : ?>
    22 <h1>
    23 <?php echo $this->escape($this->params->get(‘page_heading’)); ?>
    24 </h1>
    25 <?php endif; ?>
    26 <?php if ($params->get(‘show_title’)) : ?>
    27 <h2>
    28 <?php if ($params->get(‘link_titles’) && !empty($this->item->readmore_link)) : ?>
    29 <a href=”<?php echo $this->item->readmore_link; ?>”>
    30 <?php echo $this->escape($this->item->title); ?></a>
    31 <?php else : ?>
    32 <?php echo $this->escape($this->item->title); ?>
    33 <?php endif; ?>
    34 </h2>
    35 <?php endif; ?>

    I mean, what values does one change to what other values ?

    jdwilsonjr Friend
    #402778

    As noted in my response to Chavan I am seeking additional guidance on which values to change to which other values. Simply pointing a layperson to a file and a section and saying that is where you change “it” is not helping. Especially when it appears there are other references to the same value “h1” that are not addressed in the instructions.

    I do thank you in advance for your time and attention; especially since you do not ask for it in your every post.

    chavan Friend
    #402799

    Hi

    I have the answered the Question raised “How can we set the article title to use the seo preferred h1 tag instead of the h2 tag.”

    So i have referred the file where you need to change the tags

    Also if you need to do on other layouts of your site . Please post all the Urls.

    jdwilsonjr Friend
    #403202

    Chavan,

    in this file …

    /opt/lampp/htdocs/bweb/components/com_content/views/article/tmpl/default.php

    … I changed the h2 on line 27 and 34 as you can see.

    21 <?php if ($this->params->get(‘show_page_heading’, 1)) : ?>
    22 <h1>
    23 <?php echo $this->escape($this->params->get(‘page_heading’)); ?>
    24 </h1>
    25 <?php endif; ?>
    26 <?php if ($params->get(‘show_title’)) : ?>
    27 <h1>
    28 <?php if ($params->get(‘link_titles’) && !empty($this->item->readmore_link)) : ?>
    29 <a href=”<?php echo $this->item->readmore_link; ?>”>
    30 <?php echo $this->escape($this->item->title); ?></a>
    31 <?php else : ?>
    32 <?php echo $this->escape($this->item->title); ?>
    33 <?php endif; ?>
    34 </h1>
    35 <?php endif; ?>

    The attached images show that the “logo” is still h1 and the “article title” is still h2.

    I am following your instructions as best I can. So sorry this is a private server so urls not readily available. On the other hand this is with your standard ja_t3_blank so I would think it would be easy to duplicate and it looks like a lot of people are interested.


    1. jd-t3-title
    2. ja-t3-logo
    chavan Friend
    #403238

    Please post your ftp details and admin details via PM I will resolve this.

    jdwilsonjr Friend
    #403731

    My site is on a private network, however the question is not about any specific site.

    It is a question about the way headings are defined in the ja_t3_blank template.

    You can get one that is exactly like the one I am using at joomlart.com.

    As important, the forum is where Joomlart customers learn new skills.

    Even if a Joomlart employee knows how, the value remains in explaining it so we know how.

    I tried to follow the various directions and was not able to produce a result.

    Please accept my apologies, close this ticket, and I will try again later.

    Phill Moderator
    #403750

    I really think you should use the solution provided by Do Ha. That will do exactly as you are asking. Simply change the <h2></h2> tags to <h1></h1> tags

    Personaly I think JA have got it right to use h2 here. Minimal use of h1 tags seems to be the thinking these days and we already have h1 tags used on the page.

    jdwilsonjr Friend
    #403988

    Phil,

    Good to hear from you Sir.

    Yes of course I will try the solution provided by Do Ha. It resembled what the other gentleman that opened the dialogue suggested so I had no revisited.

    As for the tags:

    – complete agreement that minimal use of h1 tags, specifically just one per page, is recommended
    – IMHO the h1 tag should be on page specific content, not on the logo which is identical for each page

    This request was actually submitted along with another to change the article title from h2 to h1. I split the requests thinking it would simplify the issue 😉

    This is the current situation :
    logo = h1 (qty 1)
    article title = h2
    article headings = h3

    Ideal from my perspective :
    logo = whatever, maybe h6
    article title = h1 (qty 1)
    article headings = h2

    I will report back but it will take a while because of other stuff.

    Thanks.

    resonanz Friend
    #437510

    <em>@phill luckhurst 256582 wrote:</em><blockquote>I really think you should use the solution provided by Do Ha. That will do exactly as you are asking. Simply change the <h2></h2> tags to <h1></h1> tags

    Personaly I think JA have got it right to use h2 here. Minimal use of h1 tags seems to be the thinking these days and we already have h1 tags used on the page.</blockquote>

    That is a really long way going about changing a basic template attribute. Where is the other H1 tags for that template on an article page? Is it in the logo block with the sitename in H1- pretty sure that’s not good use of H1 either on every single page at expense of a good relevant article title.

    frodojrr Friend
    #489562

    For Ja_Teline_IV, the file to change is in /templates/ja_teline_iv/html/com_content/article/default.php

Viewing 13 posts - 1 through 13 (of 13 total)

This topic contains 13 replies, has 5 voices, and was last updated by  frodojrr 11 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum