1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

Custom Tab, Custom Button

Discussion in 'Developing, APIs and extending' started by Joe_1, Aug 11, 2017.

  1. Joe_1

    Joe_1 New Member

    Hi,

    I seem to be struggling a little with the sequence of adding a Custom Tab, followed by a Custom Button.

    I want to achieve the following:

    - Custom Tab on View Ticket Page (via staff_tickets_viewtickettab.hook)
    - Add Custom Buttons to the Custom Tab
    - Custom Buttons will call javascript functions
    - Add HTML to the content area of the Custom Tab

    I have created/installed an application, I have the hook and controller.

    Where I am having problems:

    In the Hook:

    $tabCRM = $this->UserInterface->AddTab('CRM', 'icon_tickets.png', 'crm', false, false, 4);
    $this->UserInterface->Toolbar->AddButton('View Quotes', 'icon_bulbon.gif');


    This creates the Tab, but adds the Button to the General Tab, rather than the custom tab.

    Can someone explain the correct sequence/objects that I should be calling to do this? Or post an example.

    Thanks
     
  2. Joe_1

    Joe_1 New Member

    I'll respond to myself in case others need the solution

    $tabCRM = $this->UserInterface->AddTab();
    $tabCRM->LoadToolbar();
    $tabCRM->Toolbar->AddButton()

    Is the order
     

Share This Page