Some of the things I have done to try and fix it :
– I have tried changing from 3columns.phtml to the one I worked on – 2columns-left.phtml, on many different places but it already says 2columns~.
– Tried clearing cache lots of times.
– Also changed to this template in cms and category as well but still isn’t
working.
My first page is doing what I want it to do. But when I click on products or any cms-page, then the logo and header looks completely wack and is even missing a background element that I added with div in the header.phtml
Does anyone have a clue of why this happens? 🙁 And where I’m supposed to change something?
From the 2columns-left.phtml :
<?php
/**
* Template for Mage_Page_Block_Html
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
<head>
<?php echo $this->getChildHtml('head') ?>
</head>
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<?php echo $this->getChildHtml('after_body_start') ?>
<div class="wrapper">
<?php echo $this->getChildHtml('global_notices') ?>
<div class="page">
<?php echo $this->getChildHtml('header') ?>
<div class="main-container col2-left-layout">
<div class="main">
<?php echo $this->getChildHtml('breadcrumbs') ?>
<div class="col-main">
<?php echo $this->getChildHtml('global_messages') ?>
<?php echo $this->getChildHtml('content') ?>
</div>
<div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
</div>
</div>
<?php echo $this->getChildHtml('footer') ?>
<?php echo $this->getChildHtml('before_body_end') ?>
</div>
</div>
<?php echo $this->getAbsoluteFooter() ?>
</body>
</html>
From the header.phtml :
<?php
/**
/**
* @var Mage_Page_Block_Html_Header $this
*/
?>
<div class="header-container">
<div class="header">
<?php if ($this->getIsHomePage()):?>
<div class="header-menu">
<p></p>
<?php echo $this->getChildHtml('topMenu') ?>
</div>
<div class="header-bg">
<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>
<div class="quick-access">
<?php echo $this->getChildHtml('store_language') ?>
<p class="welcome-msg"><?php echo $this->getWelcome()?></p>
<?php echo $this->getChildHtml('topLinks') ?>
</div>
<?php echo $this->getChildHtml('topBar') ?>
<?php echo $this->getChildHtml('topContainer'); ?>
</div>
This works on the first page (the index/home), but then on all the other pages when I click around – the header doesn’t seem to include this code (atleast that’s what I think because it doesn’t look like it does) :
<div class="header-menu">
<p></p>
<?php echo $this->getChildHtml('topMenu') ?>
</div>
<div class="header-bg">
<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>
Move your code outside of the getIsHomePage()):?> check
should become something like: