0

Following is my theme's layout.xml, but seems like it it not loaded

<?xml version="1.0"?>
    <layout>
      <default>
        <reference name="content" after="*">
        <block type="cms/block" name="test.c"> 
            <action method="setBlockId">
                <block_id>contact</block_id>
            </action>
        </reference>
      </default>
    </layout>

I tried removing after="*" but it didn't work, is my syntax wrong? It is located under app/design/frontend/{my_theme}/{my_package}/layout/local.xml

1

You missing end block here follow below changes, and also replace * with -

<?xml version="1.0"?>
<layout>
  <default>
    <reference name="content" after="-">
      <block type="cms/block" name="test.c"> 
        <action method="setBlockId">
            <block_id>contact</block_id>
        </action>
       </block> 
    </reference>
  </default>
</layout>
2
  • @Murtaza thanks, i want to use it after content, but it shows before the content? Can i also use my handle and insert custom css file using local.xml
    – localhost
    Sep 21 '16 at 10:22
  • please check on which block you want to show this block and set after="thatblockName" Sep 21 '16 at 10:24
0

Try bellow code

<reference name="content" after="*">
    <block type="cms/block" name="test.c">
        <action method="setBlockId">
            <block_id>contact</block_id>
        </action>
    </block>
</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.