Magento

How to set custom footer static block in XML?

Hello  friends today I will think that if someone is wants to change the footer static block then at which place we have to change the name of that static block. So I have find solution  for that and I will share with you.

Step 1 : Create your static block in Magento admin panel >> CMS >> Static Block >> Click on that.

Step 2 : Click on the Add new Block and you see one page.

Creating new static block

Step 3 : After fill all fields press on save block.

Step 4: now you are creating a new footer static block. now learn where to assign a this footer static block in XML file.

Step 5:go to your magento root directory folder and open below path

magento\app\design\frontend\default\[Your Theme Folder]\layout\cms.XMl

open that file.

Step 6: Find the below code in that

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

Step 7: Now Change the below Changes.

 <default>
 <reference name="footer">
   <block type="cms/block" name="cms_YOUR_STATIC_BLOCK_NAME" before="footer_links">
      <action method="setBlockId">
          <block_id>ENTER YOUR Identifier Which we are give when creating a block</block_id>
      </action>
   </block>
</reference>
</default>

Step 8 : Now clear your catch and run in browser you can see your new footer.

Hope you like my Tutorial.

Advertisements

Leave your comments

Please log in using one of these methods to post your comment:

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