TWF Frontpage
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 posted this at 18:50 — 2nd February 2009.
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.
a Padded Cell our articles site!
decibel.places posted this at 20:00 — 2nd February 2009.
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 posted this at 07:06 — 3rd February 2009.
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 topage.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.
Civil Engineering Review
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.