适用于新CMS布局的Magento模块,但版本为1.7.0.2 [英] Magento Module for new CMS layout, but in version 1.7.0.2

查看:52
本文介绍了适用于新CMS布局的Magento模块,但版本为1.7.0.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Magento中的CMS页面创建一个新的布局选项.我遵循了Magento Wiki上的说明一个模块,它不起作用.当我对实际的核心config.xml文件进行相同的添加时,它可以正常工作,但不能作为自定义模块使用.根据一些研究,这似乎可以在Magento 1.6中使用,但不适用于1.7,我试图找出原因.我有以下内容:

I'm trying to simply create a new layout option for a CMS page in Magento. I've followed the instructions here on the Magento wiki to create a module and it does not work. When I make the same addition to the actual core config.xml file, it works fine, but not as a custom module. Based on some research it looks like this would have worked in Magento 1.6, but does not work on 1.7, I'm trying to figure out why. I have the following:

app/etc/modules/Fruit_Banana.xml

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

应用/代码/本地/水果/香蕉/etc/config.xml

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

有什么想法为什么它似乎不能作为模块工作?我正在使用1.7.0.2版

Any ideas why it doesn't seem to be working as a module? I am using version 1.7.0.2

推荐答案

好象我搞砸了!实际上它在1.7中确实有效,我的问题是我将config.xml的文件名拼写为confix.xml

Well seems like I messed up! It does in fact work in 1.7, my problem was I had the filename for config.xml spelled confix.xml

一旦我对此进行了调整,自定义布局就会立即弹出!感谢那些参与其中的人.

Once I adjusted that, the custom layout popped right up! Thanks to those that chimed in.

这篇关于适用于新CMS布局的Magento模块,但版本为1.7.0.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆