TWF Frontpage

RTFVerterra's picture

He has: 109 posts

Joined: Dec 2008

Good day, in connection to the post How did you theme this forum ?, I have some more questions. I hope I'm not too much to you guys and big thanks for being helpful.

My site is not yet live and I need to iron more things. I set my frontpage to http://example.com/forum instead of http://example.com/node. My problem is the title tag which becomes <title>Forums | Site Name</title>. I just want it to become <title>Site Name</title>. And I don't want the page title Forums to appear in the frontpage. You may take a look at it here. I have no idea how to accomplish these things. I notice the TWF frontpage that you successfully get rid of it. I try to use the node-forum.tpl.php as suggested by JeevesBond.

Thank you in advance.

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

The secret to this is in page.tpl.php, you'll see a <title> tag in there. Change it like this:

<title><?php
 
if ($is_front) {
    print
'Get help with web design, programming, CSS, HTML + more - The Webmaster Forums';
  }
  else {
    print
$head_title;
  }
 
?>
</title>

A bit hack-ish, but it works. Smiling

a Padded Cell our articles site!

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

A better approach would be the Page Title module

then you won't lose your "hack" if you change/update your theme (at least in D6)

RTFVerterra's picture

He has: 109 posts

Joined: Dec 2008

Thank you. I use both. I use Page Title module to accomplish the <title> and use the code below to page.tpl.php to hide the page title Forums in the front page.

<?php if ( !$is_front ) : ?>
<h1 class="title"><?php print $title ?></h1>
<?php endif; ?>

I took the above code from here. Thanks again.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.