Solved! Go to Solution.
Hi @ApsG
You can create a new logo.phtml file in page/html folder.
default/template/page/html/logo.phtml
You need to add following code:
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magento.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category design
* @package base_default
* @copyright Copyright (c) 2006-2018 Magento, Inc. (http://www.magento.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
/**
* @var Mage_Page_Block_Html_Header $this
*/
?>
<div class="header-container">
<div class="header">
<?php if ($this->getIsHomePage()):?>
<h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
<?php else:?>
<a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
<?php endif?>
</div>
</div>
then you need to add following line:
<reference name="root">
<remove name="header"/>
<remove name="footer"/>
</reference>
<reference name="after_body_start">
<block type="page/html_header" name="logo" template="page/html/logo.phtml"/>
</reference>
I hope it will work for you!
Hi @ApsG
Try the same which your are using.
<reference name="root">
<remove name="header"/>
<remove name="footer"/>
</reference>and try to call logo block again.
<cms_index_index>
<reference name="header">
<block type="core/template" name="logo" template="page/html/logo.phtml"/>
</reference>
/cms_index_index>Please cross verify the "page/html/logo.phtml" path in your theme once.
I hope it will help you!
Hi Vimal,
Thanks for the suggestion but the the "page/html/logo.phtml" is missing in the theme. However, in the final rendering the logo is present. Certainly being picked up from somewhere in Magento's theme fall back mechanism.
For this to work :
<block type="core/template" name="logo" template="page/html/logo.phtml"/>
The question is where is the logo.phtml ?
Hi @ApsG
You can create a new logo.phtml file in page/html folder.
default/template/page/html/logo.phtml
You need to add following code:
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magento.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category design
* @package base_default
* @copyright Copyright (c) 2006-2018 Magento, Inc. (http://www.magento.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
/**
* @var Mage_Page_Block_Html_Header $this
*/
?>
<div class="header-container">
<div class="header">
<?php if ($this->getIsHomePage()):?>
<h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
<?php else:?>
<a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
<?php endif?>
</div>
</div>
then you need to add following line:
<reference name="root">
<remove name="header"/>
<remove name="footer"/>
</reference>
<reference name="after_body_start">
<block type="page/html_header" name="logo" template="page/html/logo.phtml"/>
</reference>
I hope it will work for you!
Yes ! With minor tweaks this works.
Had to comment out some code which was spitting out 2 logos and the Alt logo text.
A minor niggle though. On the smaller screen (a mobile device) the logo doesn't resize or use the alternate smaller size logo . A conditional in-line css media query with alternate image could maybe help fix this.
The tweaked code is listed below :
<!DOCTYPE html>
<html>
<div class="header-container">
<div class="header">
<?php if ($this->getIsHomePage()):?>
<!-- <h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
<a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong>
-->
<img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
<br/>
<?php endif?>
</div>
</div>
</html>
Is it possible to mantain this customization also for the category associated products?