Page Layouts – Adding New Page Layout Like Category Page

page-layouts

I added a new page layout in my store and now when I want add another page layout it's replaced with the previously added layout.

Why does this happen? Can't I make more than one layout?

EDIT:
I added in app/code/local/Home/Page/etc/config.xml :

<?xml version="1.0"?>
<config>
  <modules>
    <Home_page>
      <version>0.1.0</version>
    </Home_page>
  </modules>
  <global>
    <page>
      <layouts>
        <homepage translate="label">
          <label>Home_page</label>
          <template>page/homepage.phtml</template>
          <layout_handle>home_page</layout_handle>
        </homepage>
        <!-- add more layouts here -->
      </layouts>
    </page>
  </global>
</config>

Also added app/etc/Home_page.xml:

<?xml version="1.0"?>
<config>
  <modules>
    <Home_page>
      <active>true</active>
      <codePool>local</codePool>
      <depends>
        <Mage_Page />
      </depends>
    </Home_page>
  </modules>
</config>

And add this app/design/frontend/default/my-theme/template/page/homepage.phtml , that I use my layout in this page.

Best Answer

You did not show how you added more layouts, but I suspect, what's the problem:

    <homepage translate="label">
      <label>Home_page</label>
      <template>page/homepage.phtml</template>
      <layout_handle>home_page</layout_handle>
    </homepage>

The layout handle home_page as well as the element name <homepage> must be unique. So if you add additional layouts, and you use <homepage> again, it overrides the previously added <homepage> layout.

Related Topic