Using Customized Message Blocks Not Derived From "Mage_Core_Block_Messages"

Problem

If you are using customized messages blocks not derived from Mage_Core_Block_Messages, such as what is talked about in inchoo's Fancy Magento Global Messages article, LiteMage may have trouble detecting these message blocks automatically.

Solution

As of LiteMage 1.0.9, we have added support for these blocks and a convenient new customization field in the Magento Admin Panel. Navigate to System » Configuration » LITEMAGE_CACHE » LiteMage Configuration where you will find the Customized Block Names for 'message' Tag field. Use this area to define customized message blocks which render from a template.

Simply add the name field from the same XML tag you used to define your block type to the the comma separated list. If we use the previously-mentioned inchoo article as an example, we would add inchoo_global_messages to the Customized Block Names for 'message' Tag list, and the resulting tag would look like:

<block type="core/template" name="inchoo_global_messages" template="core/inchoo_global_messages.phtml" before="-" />

This method has the added benefit of being saved to the Magento database, meaning you will not be required to re-apply these changes when updating as you would in LiteMage's config.xml file.

  • Admin
  • Last modified: 2017/05/08 20:24
  • by Lisa Clarke