Saturday 15 May 2010

How do you add a custom layout to Magento that survives an upgrade? -


I added the following /app/etc/local.xml, which works obviously to prevent me from upgrading Changes are required. Did I do it correctly?

  & lt; Global & gt; ... & lt; Page & gt; & Lt; Layout & gt; & Lt; Home module = "page" translation = "label" & gt; & Lt; Label & gt; Home & lt; / Labels & gt; & Lt; Templates & gt; Page / home.phtml & lt; / Template & gt; & Lt; Layout_handle & gt; Page_home & lt; / Layout_handle & gt; & Lt; / Home & gt; & Lt; Product module = "page" translation = "label" & gt; & Lt; Label & gt; Product & lt; / Labels & gt; & Lt; Templates & gt; Page / product.phtml & lt; / Template & gt; & Lt; Layout_handle & gt; Page_product & lt; / Layout_handle & gt; & Lt; / Products & gt; & Lt; / Layout & gt; & Lt; / Page & gt; & Lt; / Global & gt;    

No, you have not done it correctly app / etc / local .xml should contain only the configuration items in the file. Magento requires it's environmental bootstrap.

To create your own Magento module and to add custom configurations to it there is "right" (i.e. to follow community standards, and therefore give you the best chance for support in the future). In addition to being the right way to work, it makes it easy for other Magento users to distribute these changes.

No comments:

Post a Comment