1

I am a newbie in magento, it seems to be an easy question but i spend hours still cannot figure it out..

I installed the sample data for Magento1.9 (attached), the bottom blocks (title in blue color) "Company" and "Connect with us" are two static blocks. But i cannot figure out how they are placed there, neither the CMS-page or other CMS-block have mention them. And i checked all XML files, none of these static blocks are mentioned! Why? How can I modify, for example, put the "company" block after the "Connect with us" block?

Thanks a lot for anyone can help! image address the blocks location

1

pakicle, Magento is manged block positioning using before and after tags xml file ...

first check what is before and after tags in layout xml

name : This is the name by which other blocks can make reference to the block in which this attribute is assigned .

before (and) after These are two ways to position a content block within a structural block. before="-" and after="-" are commands used to position the block accordingly at the very top or very bottom of a structural block.

As footer link are manged from below codes

Company:

    <block type="cms/block" name="cms_footer_links" >
        <action method="setBlockId"><block_id>footer_links_company</block_id></action>
    </block>

Quick link:

     <block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml">
            <action method="setTitle"><title>Quick Links</title></action>
        </block>

Account:

        <block type="page/template_links" name="footer_links2" as="footer_links2" template="page/template/links.phtml">
            <action method="setTitle"><title>Account</title></action>
        </block>

Connect with US:

    <block type="cms/block" name="cms_footer_links_sm" after="footer_links2">
        <action method="setBlockId"><block_id>footer_links_sm</block_id></action>
    </block>

As you want footer link sort order

QuickLink>My Account>Connected with Us>Company

corresponding block id are footer_links>footer_links2>cms_footer_links_sm>cms_footer_links Now i can ordering these link blocks using tags. Connected with Us->cms_footer_links_sm Company > cms_footer_links

I have add before......tags as cms_footer_links footer_links2

        <block type="cms/block" name="cms_footer_links" after="footer_links2">
            <action method="setBlockId"><block_id>footer_links_company</block_id></action>
        </block>

know more about layout: http://www.magentocommerce.com/design_guide/articles/intro-to-layouts

1

Company is the block with the handle footer_links_company and the connect with us is the block footer_links_sm.

The other parts are built on blocks with the name footer_links and footer_links2 via the layout xml.

<reference name="footer_links2">
    <action method="addLink" translate="label title" module="catalog"><label>My Account</label><url helper="customer/getAccountUrl" /><title>My Account</title></action>
</reference>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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