How to add data to Dashboard's html title?

Moderator: crythias

Locked
pekkaar
Znuny newbie
Posts: 41
Joined: 11 May 2010, 16:18
Znuny Version: 3.1.10
Location: Hungary

How to add data to Dashboard's html title?

Post by pekkaar »

Hi All,

having a number of browser tabs open at any given time it would be useful if I'd see the number of New/Open/etc. tickets in the OTRS's tab title -- that is the stuff between the <title> tags. I don't need this for all the different OTRS pages, but the Dashboard could pretty well put this real estate to better use than a static "Dashboard - OTRS" string.

I spent a few minutes trying to figure out where this could be done but did not find it, maybe someboday already accomplished something similar in v3.1.x ?

Thanks,
Peter
otrs 4.0.3, mysql 5.5.15, Fedora r15
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to add data to Dashboard's html title?

Post by crythias »

Kernel/Output/HTML/Standard/HTMLHead.dtl: <title>$QData{"TitleArea"} $Config{"ProductName"}</title>

Kernel/Output/HTML/Layout.pm defines

Code: Select all

    # area and title
    if ( !$Param{Area} ) {
        $Param{Area}
            = $Self->{ConfigObject}->Get('Frontend::Module')->{ $Self->{Action} }->{NavBarName}
            || '';
    }
    if ( !$Param{Title} ) {
        $Param{Title} = $Self->{ConfigObject}->Get('Frontend::Module')->{ $Self->{Action} }->{Title}
            || '';
    }
    for my $Word (qw(Value Title Area)) {
        if ( $Param{$Word} ) {
            $Param{TitleArea} .= $Self->{LanguageObject}->Get( $Param{$Word} ) . ' - ';
        }
    }
I believe the NavBarName is defined outside of the Module, so there is going to need a big rewrite to do this "appropriately", though you could theoretically hack Layout.pm with the count code.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
pekkaar
Znuny newbie
Posts: 41
Joined: 11 May 2010, 16:18
Znuny Version: 3.1.10
Location: Hungary

Re: How to add data to Dashboard's html title?

Post by pekkaar »

crythias -- thanks for the insight!
otrs 4.0.3, mysql 5.5.15, Fedora r15
Locked