Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • testbot Friend
    #138474

    for seo purposes we put <h1></h1> tags in the contentheading default articals so it looks like it’s going 200% and then adding another 180% for h1… any suggestions on how to format this properly so it doesn’t make it so giant?

    cjmicro Friend
    #293106

    Do you mean how to change the size of h1? or how to make the content heading a different size?

    Cheryl

    testbot Friend
    #293113

    well it seems that when <h1> is inside .contentheading it adds the two values so it’s like 300%.

    as a temp workaround i added <h1 style=”font-size: 130%”> to the core content>atical> default hack.

    i just thought maybe there might be a better way to do that.

    scotty Friend
    #293115

    Looking at the demo site of Kulanite it seems that the article titles and not in heading tags at all. This is a major slip by JA if thats the case with the download too.

    The heading tags styling is defined in the template.css near the start…

    /* Heading */
    h1 {font-size: 180%;}
    h2 {font-size: 150%;}
    h3 {font-size: 125%;}
    h4 {font-size: 100%; text-transform: uppercase;}

    scotty Friend
    #293116

    Hmm it seems they are H2 headings although i can’t see it in the source.

    template.css (line 317)

    h2.contentheading, .contentheading {
    color:#333333;
    font-size:200%;
    margin:0;
    padding:0;
    }

    testbot Friend
    #293124

    first, thank you for your quick reply. second, sorry for not being more clear. 🙂

    finally…

    i know it’s not supported by this site or joomla! but we made an edit to:
    components/com_content/views/article/tmpl/default.php

    we took:

    <td class=”contentheading<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>” width=”100%”>
    <?php if ($this->params->get(‘link_titles’) && $this->article->readmore_link != ”) : ?>
    <a href=”<?php echo $this->article->readmore_link; ?>” class=”contentpagetitle<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>”>
    <?php echo $this->escape($this->article->title); ?></a>
    <?php else : ?>
    <?php echo $this->escape($this->article->title); ?>
    <?php endif; ?>
    </td>

    and changed it to:

    <td class=”contentheading<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>” width=”100%”>
    <h1 style=”font-size: 135%;”>
    <?php if ($this->params->get(‘link_titles’) && $this->article->readmore_link != ”) : ?>
    <a href=”<?php echo $this->article->readmore_link; ?>” class=”contentpagetitle<?php echo $this->params->get( ‘pageclass_sfx’ ); ?>”>
    <?php echo $this->escape($this->article->title); ?></a>
    <?php else : ?>
    <?php echo $this->escape($this->article->title); ?>
    <?php endif; ?>
    </h1></td>

    we do this because the search engines can care less about “contentheading” but love “<h1>” so we like all of our headings to be <h1>.

    the problem we have is in template.css we see:

    h2.contentheading, .contentheading {
    color:#333333;
    font-size:200%;
    margin:0;
    padding:0;
    }
    /* Heading */
    h1 {font-size: 180%;}
    h2 {font-size: 150%;}
    h3 {font-size: 125%;}
    h4 {font-size: 100%; text-transform: uppercase;}

    font-size:200%; + h1 {font-size: 180%;} = 380%

    so now all of the content headings are font-size: 380%.

    you can see above that we made our changes directly in the <h1> (<h1 style=”font-size: 135%;”>) but we thought maybe there would be a better way to do it than tha.

    any thoughts or suggestions would be great.

    scotty Friend
    #293131

    CSS will not add font-size values (200%+180%). It will use which ever one is loaded last.

    testbot Friend
    #293135

    <em>@scotty 114225 wrote:</em><blockquote>CSS will not add font-size values (200%+180%). It will use which ever one is loaded last.</blockquote>

    i see. that’s weird then. i wonder why it’s so big if we don’t add <h1 style=

    hmmm…

    thanks again.

    scotty Friend
    #293146

    This is where it is being called from (unmodified)…

    h2.contentheading, .contentheading {
    color:#333333;
    font-size:200%;
    margin:0;
    padding:0;
    }

    I just tried your PHP hack above and it worked perfect but you will need to add it to Category, Frontpage, and Section pages also.

    scotty Friend
    #293148

    Good post on the topic here… http://www.wowjoomla.com/tutorials/2008/09/12/h1-tag-hack-for-joomla.html

    It seems you only have to modify 2 files (the same as you did above)

    componentscom-contentviewsfrontpagetmpldefault_item.php
    componentscom-contentviewsarticletmpldefault.php

    I never new this before. It’s amazing Joomla never changed it to set article titles in header tags.

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

This topic contains 10 replies, has 3 voices, and was last updated by  scotty 15 years, 7 months ago.

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