2012-09-10 125 views
0

如何在magento系統上添加布局?我想添加一個新的佈局,可以從管理面板中選擇。添加一個magento佈局

我想在網站上做兩個佈局。一個佈局與橫幅和另一個沒有橫幅。比方說,我想

2Columns-right.phtml2Column-right-wBanner.phtml

如何添加呢?

回答

2

爲此,您需要創建一個自定義模塊。

模塊等/下面的代碼config.xml中副本:

<?xml version="1.0"?> 
<config> 
    <global> 
    <page> 
     <layouts> 
      <custom_layout_wbanner> 
       <label>Custom Layout Banner</label> 
       <template>page/2Column-right-wBanner.phtml</template> 
      </custom_layout_wbanner> 
     </layouts> 
    </page> 
    </global> 
</config> 

希望這有助於!

+1

模塊不是必需的。這可以放在local.xml中。有一個模塊來放置佈局沒有多大意義IMO。 –

+0

謝謝扎卡里! –

+0

@ZacharySchuessler,我把它放在local.xml中,但我無法在管理中獲得選項。我究竟做錯了什麼? – mrN