Skip to Navigation

7.2. Notify Module

With agent notification modules you can inform agents about new information. A normal navigation looks like the following screen shot.

With this examplary module you can do something like the following.

Format:


# --
# Kernel/Output/HTML/NotificationMotd.pm - message of the day
# Copyright (C) 2005 Hans Mueller mail@example.com
# --
# $Id: module-format.xml,v 1.21.2.1 2007/10/17 06:24:05 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --

package Kernel::Output::HTML::NotificationMotd;

use strict;

# --
sub new {
    my $Type = shift;
    my %Param = @_;
    [...]
    return $Self;
}
# --
sub Run {
    my $Self = shift;
    my %Param = @_;
    return $Self->{LayoutObject}->Notify(Info =>  Some daily news! );
}
# --
1;
        

To use this module add the following to the Kernel/Config.pm and restart your webserver (if you use mod_perl).


# Frontend::NotifyModule - module name (50-Motd)
$Self->{'Frontend::NotifyModule'}->{'50-Motd'} = {
    Module => 'Kernel::Output::HTML::NotificationMotd',
};