RT4 Tab Callback

Hello,

I’d like to introduce an extra tab in the RT4 ticket display page that
links to an URL based on the ticket’s Id number.

I understand I need to use the Elements/Tabs/Privileged callback, but
since no arguments are passed to it, I’m not sure how I could access the
required context elements, such as the current ticket object.

In this message [1], it’s said that one should use the PageMenu ou Menu
methods in that callback, but it doesn’t seem like I can pull any useful
information from there.

Thanks,

Jerome Charaoui

[1] http://lists.fsck.com/pipermail/rt-users/2011-August/071994.html

I believe you use the PageWidgets()->child call. I have something similar to this:
PageWidgets()->child( brief_history => raw_html => $m->scomp(‘/RT-Extension-MenubarUserTickets/List’) );

I know this isn’t quite the correct syntax, but maybe that can help you get started.-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jérôme Charaoui
Sent: Wednesday, November 09, 2011 2:30 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] RT4 Tab Callback

Hello,

I’d like to introduce an extra tab in the RT4 ticket display page that
links to an URL based on the ticket’s Id number.

I understand I need to use the Elements/Tabs/Privileged callback, but
since no arguments are passed to it, I’m not sure how I could access the
required context elements, such as the current ticket object.

In this message [1], it’s said that one should use the PageMenu ou Menu
methods in that callback, but it doesn’t seem like I can pull any useful
information from there.

Thanks,

Jerome Charaoui

[1] http://lists.fsck.com/pipermail/rt-users/2011-August/071994.html
RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain November 28 & 29, 2011

Hello,

I’d like to introduce an extra tab in the RT4 ticket display page
that links to an URL based on the ticket’s Id number.

I understand I need to use the Elements/Tabs/Privileged callback,
but since no arguments are passed to it, I’m not sure how I could
access the required context elements, such as the current ticket
object.

In this message [1], it’s said that one should use the PageMenu ou
Menu methods in that callback, but it doesn’t seem like I can pull
any useful information from there.

As I also said in that message, you should have a look at one of the
4.0 compatible extensions if you want to see working code. I
suggested JSGantt

It contains a working callback to add menus in RT4.
The query string checking isn’t necessary if you just want to add it
everywhere.

-kevin