Magento

Menu


Top user menu

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

To main menu

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

Top shopping cart

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

Top search

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

Add extra link in top user menu:

<reference name="top.links">
    <action method="addLink" translate="label title"><label>Shop</label><url>abc</url><title>Shop</title><position>1</position></action>
</reference>
<reference name="top.links">
    <action method="removeLinkByUrl"><url helper="customer/getAccountUrl"/></action>
</reference>

Add extra link in bottom menu

<reference name="footer">
    <block  as="footer_link_cms"  type="cms/block" name="cms_footer_links" before="footer_links">
        <action method="setBlockId"><block_id>footer_links</block_id></action>
    </block>
</reference>
<reference name="footer_links">
    <action method="removeLinkByUrl"><url helper="catalog/map/getCategoryUrl"/></action>
</reference>

Remove block

<default>
    <remove name="footer_links"/>
</default>

Add static block

<reference name="footer">
    <block  as="callstaticblock" type="cms/block" name="callstaticblock" before="footer_links">
        <action method="setBlockId"><block_id>footer_links</block_id></action>
    </block>
</reference>

Tree menu

<reference name="footer">
    <block type="catalog/navigation" before="nab_pict" name="treemenu" template="catalog/navigation/tree_menu.phtml" />
</reference>

Add static block anywhere

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

Add block anywhere

<?php echo $this->getLayout()->createBlock('catalog/product_new')->setTemplate('catalog/product/new.phtml')->toHtml(); ?>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s