Question

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>
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top