RT3.8 -> RT4 Callback changes - Elements/Tabs/Default

Having gotten a working base RT4 install with my data in it, I’m going
through the few local changes we have and confirming that they still
work. Mostly they do, but one doesn’t and I don’t exactly see the “new way”:

In my old Elements/Tabs/Default I modified $toptabs, to add some extra
options to the side menu:

$toptabs->{‘ZZZZZX’} = { title => loc(‘Conferences’),
path => ‘Extras/conferences.html’
};

In the new interface, it looks like Elements/Tabs/Default is now
Elements/Tabs/Privileged but that doesn’t look like it takes any
parameters, so I don’t see what it could modify.

So how do you modify the menus in RT 4.0.x? And I guess more generally:
is there some kind of migration guidance online somewhere for upgraders?

Thanks for any pointers,

Howie

Having gotten a working base RT4 install with my data in it, I’m going
through the few local changes we have and confirming that they still
work. Mostly they do, but one doesn’t and I don’t exactly see the “new way”:

In my old Elements/Tabs/Default I modified $toptabs, to add some extra
options to the side menu:

$toptabs->{‘ZZZZZX’} = { title => loc(‘Conferences’),
path => ‘Extras/conferences.html’
};

In the new interface, it looks like Elements/Tabs/Default is now
Elements/Tabs/Privileged but that doesn’t look like it takes any
parameters, so I don’t see what it could modify.

So how do you modify the menus in RT 4.0.x? And I guess more generally:
is there some kind of migration guidance online somewhere for upgraders?

Look at some of the extensions that have been updated for 4.0, such as
JSGantt. You now call the PageMenu or Menu methods and get a menu
object to change, based on which menu you want to affect.

-kevin

Howard,

I just did this for Asset Tracker. Let me know if you need any help.

-ToddOn Wed, Aug 3, 2011 at 11:32 AM, Howard Jones howie@thingy.com wrote:

Having gotten a working base RT4 install with my data in it, I’m going
through the few local changes we have and confirming that they still
work. Mostly they do, but one doesn’t and I don’t exactly see the “new way”:

In my old Elements/Tabs/Default I modified $toptabs, to add some extra
options to the side menu:

$toptabs->{‘ZZZZZX’} = { title => loc(‘Conferences’),
path => ‘Extras/conferences.html’
};

In the new interface, it looks like Elements/Tabs/Default is now
Elements/Tabs/Privileged but that doesn’t look like it takes any
parameters, so I don’t see what it could modify.

So how do you modify the menus in RT 4.0.x? And I guess more generally:
is there some kind of migration guidance online somewhere for upgraders?

Thanks for any pointers,

Howie


2011 Training: http://bestpractical.com/services/training.html

So is the answer to this question to continue to use Callback but with
the filename “Privileged” instead of “Default” ?

What is the code to make a new Menu item at the top of every page?

/opt/rt4/local/html/Callbacks/Default/Ticket/Elements/Tabs/Privileged

with

<%INIT>

Menu->child( new => title => “bbbbbbbbb” => path => “/lalala?lala=1”
);

</%INIT>

does nothing.

The suggestion to look at JsGant extension is not that helpful because
they are just operating on what used to be the top tab menu items in
3.x. I want to add an item to the “Tickets” global menu item (what
used to be the left side nav in 3.x).

is “PageMenu” for the toptabs and “Menu” for the global menu?

The only other info I could find on this topic is
Carbon60: Cloud Consulting - Services and Solutions and that isn;t
much to go on.

Could I have a code example of how someone has added something to the
global menu in 4.x?

Allen

Here’s my callback code to add an item to global “Tools” menu:

<%init>
my $tools = Menu()->child(‘tools’);
$tools->child( timeworkedreport => title => ‘Time Worked Report’, path => ‘/Tools/Reports/TimeWorkedReport.html’, description => ‘Time Worked Report’ );
</%init>
<%args>
$Actions => undef
</%args>

MarkR-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Allen
Sent: Thursday, September 15, 2011 6:23 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT3.8 → RT4 Callback changes - Elements/Tabs/Default

So is the answer to this question to continue to use Callback but with the filename “Privileged” instead of “Default” ?

What is the code to make a new Menu item at the top of every page?

/opt/rt4/local/html/Callbacks/Default/Ticket/Elements/Tabs/Privileged

with

<%INIT>

Menu->child( new => title => “bbbbbbbbb” => path => “/lalala?lala=1”
);

</%INIT>

does nothing.

The suggestion to look at JsGant extension is not that helpful because they are just operating on what used to be the top tab menu items in 3.x. I want to add an item to the “Tickets” global menu item (what used to be the left side nav in 3.x).

is “PageMenu” for the toptabs and “Menu” for the global menu?

The only other info I could find on this topic is
Carbon60: Cloud Consulting - Services and Solutions and that isn;t much to go on.

Could I have a code example of how someone has added something to the global menu in 4.x?

So is the answer to this question to continue to use Callback but with
the filename “Privileged” instead of “Default” ?

What is the code to make a new Menu item at the top of every page?

/opt/rt4/local/html/Callbacks/Default/Ticket/Elements/Tabs/Privileged

No Ticket in that path.

with

<%INIT>

Menu->child( new => title => “bbbbbbbbb” => path => “/lalala?lala=1”
);

</%INIT>

does nothing.

With a correct path, it works fine for me

Menu does do the top level while PageMenu does the page’s menu.
You can read more about then in the perldoc in RT::Interface::Web::Menu

-kevin

Thank you, everyone.

Looks like the correct file location for me to make new global top
menu items is:

/opt/rt4/local/html/Callbacks/Default/Elements/Tabs/Privileged

I added one to the “Tickets” menu by substituting ‘search’ for 'tools’
in Mark’s example code.

Allen