I am using Magento 1.8.1, and I couldn't find any solution to replace the text links 'My Account', 'My Wishlist', 'My Cart', 'Log In', Log Out' for icons/image links for my Mobile responsive version.
When I inspect my page hint path I have these files that appears:
- header.phtml file [/app/design/frontend/default/[Theme]/template/page/html]
in which I have the following code that I cannot replace text link by images since my Text links are not directly explicitly mentioned here (so I cannot call a class in my css):
<?php echo $this->getChildHtml('store_switcher') ?>
<div class="form-language">
<?php echo $this->getChildHtml('store_language')?>
</div>
<div class="currency">
<?php echo $this->getChildHtml('custom_currency_selector') ?>
</div>
<div class="minicart">
<?php echo $this->getChildHtml('top_cart') ?>
</div>
<div class="clear"></div>
<?php echo $this->getChildHtml('topLinks') ?>
From links.phtml
[/app/design/frontend/default/[Theme]/template/page/template]
I have the following code that also appear when I do a code inspection:<?php $_links = $this->getLinks(); ?> <?php if(count($_links)>0): ?> <ul class="links"<?php if($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif;?>> <?php foreach($_links as $_link): ?> <?php if ($_link instanceof Mage_Core_Block_Abstract):?> <?php echo $_link->toHtml() ?> <?php else: ?> <li <?php if($_link->getIsFirst()||$_link->getIsLast()): ?> class="<?php if($_link->getIsFirst()): ?>first<?php endif; ?><?php if($_link->getIsLast()): ?>last<?php endif; ?>" <?php endif; ?> <?php echo $_link->getLiParams() ?>> <?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?> </li> <?php endif;?> <?php endforeach; ?> </ul>
Which is impossible to retrieve the relevant class to call it on my css file in order for me to put an image. Note I believe text links are called with the following code:
.links { text-align: right; }
.links li { display:inline; padding: 1px 10px 1px 5px; background: url(../images/toplinksap.png) no-repeat center right; }
.links li.first { padding-left:0 !important; }
.links li.last { background:none !important; padding-right:0 !important; }
In which xml file such as customer.xml [app/design/frontend/default/blanco/layout] gives the position of the links for example for 'My Account' I have the following code:
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>**My Account**</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
</reference>
</default>
So my questions are how can I replace the label "My Account" by an image? (code if not relevant which file should I modify with which code + images path for uploading purpose are appreciated).