How can I only display the "My Account" link in the top links in magento?

I have displayed all the links in the footer and I want to show the link "My account" in the header only

So how can I do this.

Should I use a static block from cms pages or block from an xml file?

Can anybody help me

Thanks in advance

+3
source share
2 answers

" " goto app/design/frontend/default ( )/( )/page/html/header.phtml. "li" " " , " " .

:)

theme/layout/customer.xml, , , , , , . ' ( ...).

<default>

    <!-- Mage_Customer -->
    <reference name="top.links">
        <action method="addLink" translate="label title" module="customer"><label>Home</label><url></url><title>Home</title><prepare>true</prepare><urlParams/><position>5</position></action>
        <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>94</position></action>
        <action method="addLink" translate="label title" module="customer"><label>Deliveries</label><url>deliveries</url><title>Deliveries</title><prepare>true</prepare><urlParams/><position>95</position></action>
        <action method="addLink" translate="label title" module="customer"><label>Returns</label><url>returns</url><title>Returns</title><prepare>true</prepare><urlParams/><position>96</position></action>
        <action method="addLink" translate="label title" module="customer"><label>Contact Us</label><url>contacts</url><title>Contact Us</title><prepare>true</prepare><urlParams/><position>97</position></action>
    </reference>
</default>

:)

+4

1:

top.links. xml , . checkout.xml - :

 <default>
    <reference name="top.links">
        <block type="checkout/links" name="checkout_cart_link">
            <action method="addCartLink"></action>
            <action method="addCheckoutLink"></action>
    </block>
    </reference>
</default>

, top.links.

2:

, , cms . cms ,

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('toplinksblock')->toHtml() ?>

, , :

<reference name="footer">
  <block type="cms/block" name="sample_links">
    <action method="setBlockId"><block_id>sample_links</block_id></action>
  </block>
</reference>

:

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

3:

top.links.phtml.

+3

All Articles