0

How can I add icons social and login in Magento 1.9 Homepage header?

0

app/design/frontend/{package}/{theme}/layout/local.xml

<default> 
    <reference name="header">
        <block type="core/template" name="social-icons" template="page/html/social-icons.phtml" />
    </reference> 
<default> 

app/design/frontend/{package}/{theme}/template/page/html/header.phtml

<?php echo $this->getChildHtml('social-icons') ?>

app/design/frontend/{package}/{theme}/template/page/html/social-icons.phtml

<!-- social network content goes here -->

<div class="social-network-icons">
    ...
</div>

<!-- Login content goes here -->
<div class="login-logout">
    <?php if ( ! Mage::getSingleton('customer/session')->isLoggedIn() ): ?>
            <span><a href="<?php echo $this->getBaseUrl("").'customer/account/login'; ?>"><?php echo $this->__("Login"); ?></a></span>
    <?php else : ?>
            <span><a href="<?php echo $this->getBaseUrl("").'customer/account/logout'; ?>"><?php echo $this->__("Logout"); ?></a></span>
    <?php endif; ?>    
    ?>

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.