Find out more about the “Show Off Your Avatar Campaign
RocketTheme  |  General  |  The Water Cooler  |  Topic: HTML & CSS question - h1 tag for titles [SOLVED] « previous next »
Pages: 1 [2] Go Down Print
Author Topic: HTML & CSS question - h1 tag for titles [SOLVED]  (Read 17335 times)
GollumX
Professional
Hero Rocketteer
*
Offline Offline

Posts: 2750


Got Coffee?

Re: CSS question - h1 tag for titles [SOLVED]
« Reply #15 on: August 28, 2007, 02:51:23 AM »

Great you got this working guys.
I suggest you change the CSS in the title of this thread to HTML. Smiley
« Last Edit: August 28, 2007, 03:22:11 AM by GollumX » Logged

Say no to Internet Explorer 6.
Franck
Hero Rocketteer
*****
Offline Offline

Posts: 893


Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #16 on: August 28, 2007, 03:00:44 AM »

Added html in the title of this thread but not removed css since it's necessary to change css too.
I tried a mambot to do this but I use SEF Patch extended in my sites and the compatibility is not good.

This change for titles is really a great improvement for SEO!
Logged
Roland Fischer
Rocketeer
***
Offline Offline

Posts: 78

Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #17 on: August 31, 2007, 12:42:08 AM »

Just two small comments.

If you are using Category or Section tables the header appears in a "componentheading" div. So here also a h1 tag has to be added.

To be able to differentiate between "normal" h1 tags used in contents and those used as componentheading and contentheading add-ons I gave them an own class (eg contenttitel). This allows different styling.

Roland
Logged
Franck
Hero Rocketteer
*****
Offline Offline

Posts: 893


Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #18 on: September 02, 2007, 06:21:44 AM »

Hi Roland,

It would be interesting if you provide in this thread the changes you made in the code  Wink
Logged
Roland Fischer
Rocketeer
***
Offline Offline

Posts: 78

Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #19 on: September 04, 2007, 01:22:17 AM »

It would be interesting if you provide in this thread the changes you made in the code  Wink

For the componentheading/h1 replacement change in /components/com_content/content.html.php line 44

Code:
?>
<div class="componentheading<?php echo $params->get'pageclass_sfx' ); ?>">
<h1 class="contenttitel"><?php echo htmlspecialchars$title->nameENT_QUOTES ); ?></h1>
</div>
<?php

Please note that 3rd party components might generate own componentheadings. So additional hacks are required.


This has been posted already: contentheading/h1 replacement line 614 (please note that if you are using linked titles you have to add another h1 tag a couple of llines above...):

Code:
<td class="contentheading<?php echo $params->get'pageclass_sfx' ); ?>" width="100%">
<h1 class="contenttitel"><?php echo $row->title;?></h1>
<?php HTML_content::EditIcon$row$params$access ); ?>
</td>

I am using an own h1 class <h1 class="contenttitel"> to make specific formats.

Roland
Logged
GollumX
Professional
Hero Rocketteer
*
Offline Offline

Posts: 2750


Got Coffee?

Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #20 on: September 04, 2007, 02:12:05 AM »

Just for those crazy about SEO, check out http://www.a8ejoomla.com/
Logged

Say no to Internet Explorer 6.
CyberSmyth
Professional
Newbie
*
Offline Offline

Posts: 4

Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #21 on: September 28, 2007, 07:54:11 AM »

For anyone interested in SEO I have just implemented the JooFox additions that allow you to use the content item alias to create a page title tag and also a H1 header module.

You have to first update the admin template then install the title mambot and the header module. Works ok for me.

As the front page is a special case I use the global title to set the frontpage  and the content alias for all other pages.

Get them at http://www.antoniodeluca.info/

Cybersmyth
Logged
teletrance
Jr. Rocketeer
**
Offline Offline

Posts: 27

Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #22 on: March 27, 2008, 03:16:03 PM »

hello, in my 1.5.1 Joomla with Replicant tmpl I could not foung an /components/com_content/content.html.php file.
can anybody tell me how to solve this?
tnx
Logged
GollumX
Professional
Hero Rocketteer
*
Offline Offline

Posts: 2750


Got Coffee?

Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #23 on: March 27, 2008, 09:21:15 PM »

In 1.5, you'd best do this in the template via something called template overrides.

It's pretty complicated if you don't understand php but you can get the general idea from the Beez template that came packaged with J1.5

The Beez template overrides also strip out all J tables... so you end up with a completely tableless template.
Logged

Say no to Internet Explorer 6.
Stefan Rest
Newbie
*
Offline Offline

Posts: 4

Re: HTML & CSS question - h1 tag for titles [SOLVED]
« Reply #24 on: April 21, 2008, 06:09:46 AM »

hello, in my 1.5.1 Joomla with Replicant tmpl I could not foung an /components/com_content/content.html.php file.
can anybody tell me how to solve this?
tnx

I accomplished this yesterday. Here is the code I am using now: lines 10-17


<td class="contentheading<?php echo $this->params->get( 'pageclass_sfx' ); ?>" width="100%"> <h1>
      <?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>


The file you need to modify is  the default.php in the Article directory.

Here is the path: /components/com_content/views/article/tmpl/default.php
Logged
Pages: 1 [2] Go Up Print 
RocketTheme  |  General  |  The Water Cooler  |  Topic: HTML & CSS question - h1 tag for titles [SOLVED] « previous next »
Jump to: