Using Customized Message Blocks Not Derived From "Mage_Core_Block_Messages"

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.

As of LiteMage 1.0.9, we have added both support and a convenient new customization field in the Magento Admin Panel under System » Configuration » LITEMAGE_CACHE » LiteMage Configuration called “Customized Block Names for 'message' Tag” that can be used to define customized message blocks that render from a template.

All you have to do is add the name field from the same XML tag you used to define your block type to the the comma separated list “Customized Block Names for 'message' Tag”. If we use the previously mentioned inchoo article as an example, this tag would look like:

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

Where we would add “inchoo_global_messages” to the “Customized Block Names for 'message' Tag” list. This also 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: 2015/12/18 21:02
  • by Michael Alegre