Hiding a Node Title for homepage.
bswonetz - April 25, 2009 - 23:21
I am trying to hide the title on a specific page that I have used for my homepage. I have looked at many different posts, but nothing has worked thus far. Right now I have named the page with a ".", but I would like to get it out of there completely.
I am using superclean theme with drupal 6.
Here is a link:
thanks, bswonetz

=-=
create a custom page-front.tpl.php and remove the title variable or investigate the auto_nodetitle.module
An alternative approach
You can add logic that uses $is_front and skip printing the title when true, something like
<?php if ( !$is_front && $title ) : ?><h2><?php print $title; ?></h2>
<?php endif; ?>
an alternative approach?
Hi Nevets,
I am on to learning PHP right now, so not to skilled in where on the page to insert this. I have tried to insert it into the bottom of the body section here:
<div id="body-section<?php if(!$left AND !$logo) {print '-wide';} ?>">
<?php print $tabs ?>
<?php print $messages ?>
<?php if($content_top) { ?>
<div id="content-top"><?php print $content_top ?></div>
<?php } ?>
<h1 id="page-title"><?php print $title ?></h1>
<?php print $help ?>
<?php print $content ?>
</div>
<?php if ( !$is_front && $title ) : ?>
<h2><?php print $title; ?></h2>
<?php endif; ?>
<!--END BODY-SECTION-->
Does it need to be inside the div section? Or not in that area at all? It doesn't work where I have put it, so...
Thanks, Clueless
Something like this should be
Something like this should be the ticket:
<div id="body-section<?php if(!$left AND !$logo) {print '-wide';} ?>"><?php print $tabs ?>
<?php print $messages ?>
<?php if($content_top) { ?>
<div id="content-top"><?php print $content_top ?></div>
<?php } ?>
<?php if (!$is_front && $title): ?><h1 id="page-title"><?php print $title ?></h1><?php endif; ?>
<?php print $help ?>
<?php print $content ?>
</div>
<!--END BODY-SECTION-->
Thanks gbrussel!
Thanks a lot! That worked flawlessly.
Best, Brad
May I know where can I find this script?
I plan to hide the title page from being viewed as well. But I do not know where exactly the particular script you were saying.
<div id="body-section<?php if(!$left AND !$logo) {print '-wide';} ?>"><?php print $tabs ?>
<?php print $messages ?>
<?php if($content_top) { ?>
<div id="content-top"><?php print $content_top ?></div>
<?php } ?>
<?php if (!$is_front && $title): ?><h1 id="page-title"><?php print $title ?></h1><?php endif; ?>
<?php print $help ?>
<?php print $content ?>
</div>
<!--END BODY-SECTION-->
May I know where can I find this script and what's the name?
*I am using clearblue theme.
Thanks
page.tpl.php
It should be in the page template file.