techwthquestion Posted November 13, 2019 Share Posted November 13, 2019 Hello, I want to display 2 hooks on the support pages. can I get some help with this, please? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 13, 2019 Share Posted November 13, 2019 7 hours ago, techwthquestion said: I want to display 2 hooks on the support pages. can I get some help with this, please? aren't they shown there by default in Six ? are you using a custom theme that isn't showing them ?? 0 Quote Link to comment Share on other sites More sharing options...
techwthquestion Posted November 13, 2019 Author Share Posted November 13, 2019 (edited) Hello brian, Yes, I am using customer theme. I managed to created 2nd box with text but I am not sure how to take input from viewticket.tpl. In the viewticket.tpl file, there is a code to fetch data Ticket, Subject, status, last update. . But how can I use that in the hook? Here is my code add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (APP::getCurrentFileName()=="viewticket"){ $secondarySidebar->addChild('sidebar1', array( 'label' => 'Ticket Information', 'order' => '10', 'icon' => 'fa-ticket"' )); $secondarySidebar->getChild('sidebar1') ->addChild('child1', array( 'label' => 'Department', 'uri' => 'http://www.google.com' )); $secondarySidebar->getChild('sidebar1') ->addChild('child2', array( 'label' => 'Submitted', 'uri' => 'http://www.google.com' )); $secondarySidebar->getChild('sidebar1') ->addChild('child3', array( 'label' => 'Last Updated', 'uri' => 'http://www.google.com' )); And here is the code from viewticket.tpl <h3 class="panel-title"> <i class="fas fa-pencil-alt"></i> {$_ticketContainer.subject} <small style="float:right;">Created: {$_ticketContainer.dateline} Updated: {$_ticketContainer.lastactivity}</small> </h3> <div class="date"> {$_ticketPost.posttitle} </div> <span class="name"> {$_ticketPost.fullname} </span> {$_ticket.department} {$_ticket.status} Edited November 13, 2019 by techwthquestion 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 14, 2019 Share Posted November 14, 2019 19 hours ago, techwthquestion said: Yes, I am using customer theme. the reason why I asked was because the templates/theme don't create the default sidebars - they should already exist and be visible when using Six (check if they are)... if your theme isn't showing them, but Six is, then that implies that the custom templates are not outputting the sidebar arrays correctly (or something is suppressing these sidebars)... or maybe Kayako doesn't use them. 19 hours ago, techwthquestion said: I managed to created 2nd box with text but I am not sure how to take input from viewticket.tpl you might be able to access it via the Smarty array as per your other hook thread... 19 hours ago, techwthquestion said: In the viewticket.tpl file, there is a code to fetch data Ticket, Subject, status, last update... But how can I use that in the hook? a blind, but educated, guess would be... GLOBAL $smarty; $department = $smarty->getTemplateVars()['_ticket.department']; and then... 'label' => 'Department: '.$department, 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.