-
AuthorPosts
-
February 23, 2009 at 6:09 pm #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 Friendcjmicro
- Join date:
- June 2008
- Posts:
- 501
- Downloads:
- 3
- Uploads:
- 0
- Thanks:
- 198
- Thanked:
- 81 times in 10 posts
February 23, 2009 at 7:01 pm #293106Do you mean how to change the size of h1? or how to make the content heading a different size?
Cheryl
February 23, 2009 at 7:20 pm #293113well 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 Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
February 23, 2009 at 7:29 pm #293115Looking 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 Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
February 23, 2009 at 7:32 pm #293116Hmm 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;
}
February 23, 2009 at 7:56 pm #293124first, 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.phpwe 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 Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
February 23, 2009 at 8:10 pm #293131CSS will not add font-size values (200%+180%). It will use which ever one is loaded last.
February 23, 2009 at 8:18 pm #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 Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
February 23, 2009 at 8:39 pm #293146This 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 Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
February 23, 2009 at 8:50 pm #293148Good 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.phpI never new this before. It’s amazing Joomla never changed it to set article titles in header tags.
-
AuthorPosts
This topic contains 10 replies, has 3 voices, and was last updated by scotty 15 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum