Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Moving The Logo In The Default Template
 
smnbin
Jr. Member
 
Total Posts:  14
Joined:  2008-08-28
 

Hello,

When I copy the following code from header.phtml to 2columns-right.phtml the getLogoSrc() function stops returning the path to the image.

<h1 id="logo"><a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getLogoSrc() ?>” alt="<?php echo $this->getLogoAlt() ?>” /></a></h1>

The source code when viewed in the web browser appears as:

<h1 id="logo"><a href="http://localhost/magento/index.php/"><img src="” alt="” /></a></h1>

Why would this be happening?

Thank you in advance for your assistance.

Simon

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brilliand
Member
 
Total Posts:  34
Joined:  2008-08-29
 

header.phtml and 2columns-right.phtml look at different places in the xml.  heder.phtml is connected to “<block type="page/html_header">", whereas 2columns-right.phtml is connected with “<block type="page/html">".  I’m not sure where your logo is being set, but you might try replacing “page/html” with “page/html_header” - that might allow you to use getLogoSrc() the way you want to.

 
Magento Community Magento Community
Magento Community
Magento Community
 
smnbin
Jr. Member
 
Total Posts:  14
Joined:  2008-08-28
 

Ok. I’m struggling with this, but I’m determined to figure it out.

I have cut the following code from the header.phtml file and pasted it after the <div id="wrapper"> tag in the 2-columnsright.phtml file.

<h1 id="logo"><a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getLogoSrc() ?>” alt="<?php echo $this->getLogoAlt() ?>” /></a></h1>

When I refresh the page the logo completely disappears, although when I view the source code in my web browser I see:

<div class="wrapper">
<h1 id="logo"><a href="http://localhost/magento/index.php/"><img src="” alt="” /></a></h1>

I have refreshed the Magento cache and 2-columnsright.phtml is definately the file used for the layout.

Please could someone explain step by step what I am doing wrong?

Thank you very much in advance for your assistance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Voot
Sr. Member
 
Total Posts:  261
Joined:  2008-03-20
Long Beach, CA
 

What did you want accomplished? Did you just want the logo moved? If so, I would rather leave those two pages alone and edit the box.css file instead. Using margin-top, margin-left you can move the logo anywhere you want. PM me if you have questions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
smnbin
Jr. Member
 
Total Posts:  14
Joined:  2008-08-28
 

In the default template I want to reposition the logo so that it overlaps the .header and #main layers. I want to position the logo absolutely above these two layers. To do this I need to move the logo out of the .header layer and into the #wrapper layer which is located in the 2columns-right.phtml file.

I hope this helps. Thank you for your assistance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
harry12bar
Sr. Member
 
Avatar
Total Posts:  168
Joined:  2008-01-07
 

Hi, MOve or remove.... ?

Goto your box.css and search for logo or logo.gif. (cant remember which) ... Use Fire Fox with firebug and you’ll have a bit of fun between the tears . Shows live positions of CSS and more.
Style sheet does all the work.wink

GoodLuck

 
Magento Community Magento Community
Magento Community
Magento Community
 
smnbin
Jr. Member
 
Total Posts:  14
Joined:  2008-08-28
 

Fixed it! Thank you very much… :o)

 
Magento Community Magento Community
Magento Community
Magento Community
 
mark_fabric
Jr. Member
 
Total Posts:  10
Joined:  2011-01-26
 

Complete noob here.

I have the same issue, but I refuse to fix the situation with CSS. There must be an alternative way to position the logo somewhere within the main content area.

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top