Hello.

I'm using drupal for the first time to create a web site. I'm using the 'sky' theme http://drupal.org/project/sky
I have modified the CSS heavily so that the colours are how I need the way the customer needs them.
I've been digging around in the page.tpl.php file. Due to a lack of knowledge in PHP, I do not know how to remove the site title from the header section of the page without disrupting the layout of the header itself, as the page uses a background to display the site name in the form of a jpg.
I would like drupal to know the site name as it looks nice in the browser tabs, but i want it gone from the pages.
Please please please could somebody give me a quick answer on how to do this.

Comments

teyser’s picture

Hi,
Go to admin..and click the site information link,you can remove the site name from there.

Regards,
-Raj.

danielr1’s picture

Hi, i knew this wouldn't work and I tried, Drupal returns error 'Name field is required'.

danielr1’s picture

As said i've been playing with the PHP file, I removed the site name successfully but this altered the page layout and mangles the CSS background image for that div. In PHP I tried to add an image using echo but this left a nasty border around the image. Any hints???

danielr1’s picture


if ($site_name):
Only local images are allowed.
endif;

teyser’s picture

Hi,
I knew name field is required filed.Just give one spcae character.

That's all
Regards,
-Raj.

jdhoss’s picture

Go to Admin -> Site Building -> Themes -> configure -> uncheck Site Name

snmstudio’s picture

Okay, I tried many things, including the one above, but it removed my whole header picture!

BUT, I was so happy to finally have the solution to this, that I had to register and let you guys know, lol...

What I did was add to the code in default.css (/themes/your_theme/default.css)...

/* header */
.header {
	float: left;
	width: 640px;
	background: url(img/header.jpg) no-repeat;
	font: normal 2.4em Verdana,sans-serif;
	line-height: 150px;
	text-align: center;	
	letter-spacing: -3px;
}
.header a, .header a:hover {
	text-decoration: none;
	color: #333;
	visibility:hidden;    <-----I JUST ADDED THIS LINE!!!
}

Hope this works for you guys!=)

Valkyri9’s picture

Alternatively you could have commented out the the entry for site name in page.tpl.php like this:

<?php if ($site_name) { ?><div id="siteName"><a href="<?php print $base_path ?>" title="<?php print t('Home') ?>">
<!-- <?php print $site_name ?> -->
</a></div><?php } ?>

Just in case you run into something like that again.

TobiCS’s picture

Simple answer! Works perfectly for me!

attenchin’s picture

I am unsure if I am in the right place, but I am using a modified Sky theme on version 5.

The intro is fine, but every time I click a primary link, the title of the link appears above the header.
The entire site drops down a notch, and I get this white bar with text on the top.
(see www.attenchin.com).

Any tips or hints would be much appreciated! I am not a php or java script person, but I don't have
any problems modifying stuff with specific instructions. : )

christianarmy.net’s picture

You should comment out the following to remove it :

				</div> <!-- /logo --> 
					<div id="name-and-slogan">
					<?php if ($site_name): ?>
						<h1 id="site-name">
							<!-- <a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>">
								<?php print $site_name; ?> -->
							</a>
						</h1>