I added the following to /app/etc/local.xml, which works. Obviously I need these changes to survive an upgrade. Did I do this correctly?

<global> 

...

     <page>
        <layouts>
            <home module="page" translate="label">
                <label>Home</label>
                <template>page/home.phtml</template>
                <layout_handle>page_home</layout_handle>
            </home>
            <product module="page" translate="label">
                <label>Product</label>
                <template>page/product.phtml</template>
                <layout_handle>page_product</layout_handle>
            </product>
        </layouts>
     </page>
</global>
有帮助吗?

解决方案

No, you did not do this correctly. The app/etc/local.xml file should contain only the configuration items Magento needs to bootstrap it's environment.

The "correct" (i.e. following community standards, and therefore giving you the best chance at support in the future) is to create your own Magento module and add the custom configuration there. Beyond being the right way to do things, this also makes it easier to distribute these changes to other Magento users.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top