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

How to change page title to an image rather than text
 
mmabardy
Member
 
Total Posts:  67
Joined:  2010-07-09
 

For example, in cart.phtml it reads:

<div class="cart">
    <
div class="page-title title-buttons">
      <
h1><?php echo $this->__('Shopping Cart'?></h1>
    
<?php if(!$this->hasError()): ?>
        
<ul class="checkout-types">
            
<?php echo $this->getChildHtml('top_methods'?>

I would like to change the title text to call an image instead.  The image I would like to call is in http://www.peacestore.com/store/skin/frontend/default/theme167/images/your.cart.gif.  I tried to change this line

<h1><?php echo $this->__('Shopping Cart'?></h1>

I tried replace it and edit it many different ways.  Any suggestions?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
clorne
Sr. Member
 
Total Posts:  236
Joined:  2008-01-10
London
 

In this instance you could try a simple css background image

.cart h1 {
background-image: url(http://www.peacestore.com/store/skin/frontend/default/theme167/images/your.cart.gif);
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
mmabardy
Member
 
Total Posts:  67
Joined:  2010-07-09
 

Seems to work great.  Thank you.  Would still love to know how to call an image rather than the text from the code I placed in my original post.  Is that possible?  Thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Moderator
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Try:

<img src="<?php echo $this->getSkinUrl('your-image-path-here-relative-to-your-skin.jpg'); ?>" alt="" />
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top