Any tips on an easy way to add a logo to this great template? I could work my way through hard coding a block region but is there another way?

Cheers

CommentFileSizeAuthor
#9 CB1.png105.68 KBStitchard

Comments

chlobe’s picture

Status: Active » Closed (fixed)

Closing due to stupdity...

Just added image to header...apologies, move along people, nothing to see here

tracer’s picture

where'd you put it?? in the theme config i've checked to show 'logo', unchecked use default logo, have uploaded a custom logo, and it won't display

tracer’s picture

Status: Closed (fixed) » Active
interface-web design’s picture

To resolve this problem, please replace this code in the page.tpl

<?php if ($site_name) { ?><a href="<?php print $front_page ?>" title="<?php print t('Home') ?>"><?php print $site_name ?></a><?php } ?>

with this

          // Prepare header
          $site_fields = array();
          if ($site_name) {
            $site_fields[] = check_plain($site_name);
          }
          if ($site_slogan) {
            $site_fields[] = check_plain($site_slogan);
          }
          $site_title = implode(' ', $site_fields);
          if ($site_fields) {
            $site_fields[0] = '<span>'. $site_fields[0] .'</span>';
          }
          $site_html = implode(' ', $site_fields);

          if ($logo || $site_title) {
            print '<h1><a href="'. check_url($front_page) .'" title="'. $site_title .'">';
            if ($logo) {
              print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />';
            }
            print $site_html .'</a></h1>';
          }
        
tracer’s picture

Status: Active » Fixed

NICE! THAT WORKED! fantastic .. thank you thank you!

interface-web design’s picture

Status: Fixed » Closed (fixed)
Stitchard’s picture

Assigned: Unassigned » Stitchard
Status: Closed (fixed) » Active

Hi

Thanks for the above code, it enables me to upload a logo to the theme but for some reason I have a white stripe going across the screen through the logo. Can anyone assist, I know very little coding?

Thanks

interface-web design’s picture

Please send us live URL of your website and a screenshot of the page on which the problem is occurring so that we can assist you further.

Stitchard’s picture

StatusFileSize
new105.68 KB
Stitchard’s picture

Status: Active » Closed (fixed)

I've cracked it! I think it was to do with the size of the logo. The Drupal default logo was causing a break in the design so I assumed there was a problem, but when I inserted my own smaller logo it worked.

Thanks for your support.