Community

Can you disable the page title from showing?

On my Home Page I am stuck with the page title taking up a lot of the screen and not allowing me to have an image at the top.

Editing the Page demands a page title but can I turn it off?

Ed

Comments

you can add a condional

you can add a condional statement in your page or node template like

<?php if ($page == 0): ?>
    <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
  <?php else: ?>
    <?php print $picture ?>   
    <?php endif; ?>

This did the trick

<?php if ($title <> "Home Page"): ?>
<h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
<?php endif; ?>

Just what was required - many thanks,

Ed

Thank you!

Modified my page.tpl.php file as you did, and worked perfectly!

This saved me a lot of time.

gonzalo

Thanks, thats exactly what I

Thanks, thats exactly what I needed.

] duran goodyear
] http://alphex.com

] duran goodyear
] http://alphex.com

Good!

Works like a charm...!!!

"frontpage" title

When using the front page module, the front page shows "frontpage" before my content. I looked at this script but I am not sure exactly how to apply it. Can I paste it into my layout for the frontpage? If i have to change a template which one?

KU

Thanks!

Easy little tips like this are why I haven't given up on Drupal yet! Thanks a lot!

Or you could try using CSS

I don't show my front page title either.

It's disabled using CSS.

#header {
display:none;
}

How you determine what page you're on is up to you.

You can use php similar to the above example to insert an extra div in when it's the front page, and then set that div's display property to none.

You could try this snippet Customizing themes for node types, terms, sections, paths, and front page

In my case I use the following snippet to generate class/id attributes for each page

I'm a purist. I don't like to mess with the content if I can help it (just in case you need it one day).

Anyway, it's always good to have choices.

Cheers,
--
tys

--
tys

BLUE MOUNTAINS health & harmony
www.health-harmony.com.au

building an alternative health & spirituality community in the Blue Mountains

Detecting the current page

Even if you have clean urls enabled, you can still refer to the current node using it's node/id address. That said, you can detect one or more pages and use a different template for them. Here is an example that uses a different template for a group of nodex that are being used as home and sub-home pages:

<?php
if  (
(
arg(0) == 'node' && arg(1) == '3') ||
(
arg(0) == 'user' && arg(1) == '31')) {
    include
'page-front.tpl.php'; /*load a custom page-front.tpl.php */
   
return; }
?>

Naturally, arg(1) refers to the node ID
Alternatively, you can just use arg(0) and check for the clean url equivalent of your page

Also, instead of switching the template file, you can use the test within a template to decide whether or not you should write a title, or any other item (content block, header, switch header images etc)

-----
iDonny - Web Content Management System Design, Development. & CRM

Use page_title module

Try the page_title module (http://drupal.org/project/page_title). This will allow you to change the display of your page title.

Tim

remove title in xtemplate

Title on the page itself or in the browser?

I'm getting confused because I want to be able to not have the page title show up on the page itself and many of the suggestions and modules are about changing what shows up on top in the browser window and bookmarks.

I want to be able to use a Panel layout to create a new home page, but DO NOT want the page title showing up on the homepage. Don't need it. I don't care if I do it via PHP or CSS, but need to know where and hopefully in a way that doesn't do it for every single page.

Thanks!

John

-jbob
Raptor Ink, LLC
raptorink.com

nobody click here