Hello,
I would like to put Logo above menu like this:
https://dl.dropboxusercontent.com/u/15254827/wstawianie%20loga.JPG
Tu = here. I would be very thankful for help with making it 'coz to be honst I got no idea what to do with that.

Comments

VM’s picture

you would have to edit the page.tpl.php of your subtheme and move the $logo variable. you would also adjust the CSS as needed.

Furjoza’s picture

Thank you for your reply. You know I'm not good at those things. My page.tpl.php file looks like that:
https://dl.dropboxusercontent.com/u/15254827/page.tpl.php
Can you tell me what exactly should I change?

VM’s picture

I prefer to teach to you to fish rather than fish for you.

I'd make a backup of the file you are about to manipulate.
I suggest moving it around before removing any code from the .tpl.php file.

<img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" />

The above is the key HTML for printing the logo. However, it is wrapped in some conditional php to determine which theme settings are to be printed. Once you get the $logo to print where you need it, I can aid with removing the HTML that you no longer require.

my suggestion is to learn by experimentation on a development site.

Furjoza’s picture

Good to hear that and thank you ;)
Im total beginner with php but what I can see are some if's which are telling my site were are sidebars and where is header etc. and telling "them how to behave" I think the answer is somewhere here:

<div id="wrapper">
    <div id="container" class="clearfix">

      <div id="header"> //its giving id's so css know what to do with those div's. Thats what I think.
        <div id="logo-floater">
        <?php if ($logo || $site_title): ?> //Okey I want to have a logo and the site_title so we are closer
          <?php if ($title): ?> //No idea1
            <div id="branding"><strong><a href="<?php print $front_page ?>"> //I think it is giving name to my title
            <?php if ($logo): ?>
              <img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" /> //looks like this line of code is telling my site how logo looks like
            <?php endif; ?>
            <?php print $site_html ?>
            </a></strong></div>
          <?php else: /* Use h1 when the content title is empty */ ?>
            <h1 id="branding"><a href="<?php print $front_page ?>">
            <?php if ($logo): ?>
              <img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" /> //again somehting with an image :S
            <?php endif; ?>
            <?php print $site_html ?>
            </a></h1>
        <?php endif; ?>
        <?php endif; ?>
        </div>

        <?php if ($primary_nav): print $primary_nav; endif; ?>
        <?php if ($secondary_nav): print $secondary_nav; endif; ?>
      </div> <!-- /#header -->

I think im not good enough to handle a rod ;/
Edit: Should I look in css file for something called logo (because the code above gave my logo id=logo or there is job that has to be done in this file? To be honest I dont really know what to change here. I dont really get things like id="branding" or id="logo-floater" but it looks like something that is telling my logo what to do.

VM’s picture

I provided you the exact line of HTML to look for, copy and move in my previous comment.

As the header div contains the menu and is printed with the variable $primary_nav, I'd first move the code provided above the header div and test.

*note - you should not be editing the garland theme files or when you update core you will need to make these changes again. I HIGHLY suggest generating a subtheme of garland to protect your customizations.

Furjoza’s picture

Okey I made sub theme using this guide:
https://drupal.org/node/225125
I think I wasnt able to fail :P

Returning to our discussion. Do you mean these lines:

<div id="wrapper">
    <div id="container" class="clearfix">

?
And what do you mean by saying "move the code"?

VM’s picture

please read the following comment again: https://drupal.org/node/2099663#comment-7909789

move = change position

Furjoza’s picture

Okey I failed with making sub theme >.< I hope I will repair it fast.

Edit:
Okey I was able to put my logo where I wanted to be but still I would like to put it in the center and I dont know how to remove the old logo which still is visible :(

Edit2:
I simly added so I have something like that:
https://dl.dropboxusercontent.com/u/15254827/page2.tpl.php
Im not sure if this method isnt to primitive and still got no idea how to remove the 2nd (actually the 1st, basic) logo.

VM’s picture

 <div id="logo-floater">
        <?php if ($logo || $site_title): ?> //Okey I want to have a logo and the site_title so we are closer
          <?php if ($title): ?> //No idea1
            <div id="branding"><strong><a href="<?php print $front_page ?>"> //I think it is giving name to my title
            <?php if ($logo): ?>
              <img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" /> //looks like this line of code is telling my site how logo looks like
            <?php endif; ?>
            <?php print $site_html ?>
            </a></strong></div>
          <?php else: /* Use h1 when the content title is empty */ ?>
            <h1 id="branding"><a href="<?php print $front_page ?>">
            <?php if ($logo): ?>
              <img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" /> //again somehting with an image :S
            <?php endif; ?>
            <?php print $site_html ?>
            </a></h1>
        <?php endif; ?>
        <?php endif; ?>
        </div>

remove the above code from its current location in your page.tpl.php and paste it to where you placed the HTML utilized earlier. This assumes that your notes in the HTML provided are still correct and you want to move the logo AND the site title. don't forget to remove your comments.

if you have problems with this: utilize pastebin.org and copy your entire page.tpl.php file to it. Then copy and paste the url to your next comment.

After that utilize firebug for firefox or chromes developer tools and inspect the logo element. you will need to add a text-align: center;

lastly, please edit the opening post and set the version of Drupal in use. Thanks.

Furjoza’s picture

Actually I dont want "the site title" to exsist and I dont know how to remove it. Also I copied and pasted the code where I did that HTML line and

http://pastebin.com/MvC5Jpf2

The logo is higher then it was but it destroyed whole site composition like sidebars are above the main etc.

Edit: Ill make some screen shots.

VM’s picture

site title can be disabled in your theme settings @ admin/appearance/settings -> YOUR THEME

sidebars are above the main etc.

As mentioned, you're going to have to adjust the CSS to deal with these types of issues.

Screenshots won't aid anyone in helping solve CSS issues. A link to the site would be the only way anyone can help work you through those.

Furjoza’s picture

Okey I was able to put the image using standard html code like

<img src="" alt="" />

Now at least I know where to put it ;) But it requieres to turn off logo in the appearance/settings and if you want to change it you need to make it in this file not using the admin panel. Im not good enough to play with CSS files to make the site looks well I hoped it is possible to copy paste that code in the way it wont destroy site composition.

I have code like this:
http://pastebin.com/DNuqzb0X
and site look like that:
www.spoilsyprojekt.ugu.pl/

Is it impossible to repair it by moving the code somewhere else? Or maybe it is possible to delete something from that code and add:

<img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" />

at the beginning? And of course thank you for giving me your time and for your patience ;)

VM’s picture

you can utilize your backed up page.tpl.php and hard code the logo as you have in the altered one. Thus, leaving the orginal HTML in it's place.

Furjoza’s picture

Esh thats bad Ill try to play with css. Thanks again for your help. Im very thankful for that ;)

EDIT:
This code works perfectly good (as for now, waiting for bugs :P):
http://pastebin.com/Kh7uty9v
Logo is where it should be, I can change it with admin panel and the site is in a good shape. Call me blind-copy-paste-master :D

VM’s picture

FYI: <center> is deprecated in HTML 4.01 and unsupported in HTML5. see: http://www.w3.org/wiki/HTML/Elements/center

it is likely that your HTML no longer validates even if the tag works as you expect.

better to do:

<div id="logo-top"><img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" />
</div>

with something like the following at the bottom of your css file:

#logo-top {
text-align: center;
}
Furjoza’s picture

Thanks for you advice, I wasnt using HTML for couple of years :)