Reputation: 182
I would like to add a notification in the Admin area, something like 'Latest message' bar but under it.
I have tried using the AdminhtmlNotification module but that only adds a new message into the 'Latest message' queue and if my message is not the last one in is only displayed in the grid.
Thanks in advance for your help,
Denis Rendler
Upvotes: 0
Views: 2273
Reputation: 38
All you have to do is to add your own block under notifications handler of adminhtml layout.
<?xml version="1.0"?>
<layout>
<default>
<reference name="notifications">
<block type="extension/adminhtml_notifications" name="extension_notifications" template="extension/notification.phtml"/>
</reference>
</default>
</layout>
And then create and edit the file extension/notification.phtml:
<?php if ($message = $this->getMessage()) : ?>
<div class="notification-global">Hello!</div>
<?php endif; ?>
For more information, check this article: https://www.openstream.ch/developer-blog/adding-magento-admin-notifications-to-your-extension/
Upvotes: 2