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.

Customising user portal viewtickets_list- need code help

Discussion in 'Using Kayako Classic' started by Lineup, May 2, 2017.

  1. Lineup

    Lineup New Member

    Hi All,

    TL;DR
    what is value for <{$_language[tl]} for "Full name" (in KSQL)

    I'm trying to figure out what is the value I can use in
    viewtickets_list template to modify (add) a column called "Raised by" (ticket creator) (aka "Full Name")

    This current list has the following (when you login as user to portal and view your tickets)
    Ticket ID / Last Activity / Last replier / Department / Type / Status

    The EXPECTED results:
    Ticket ID / Last Activity / Raised by (or Created or Full Name) / Last replier / Department / Type / Status

    When I modify this and trying to emulate <{$_language[tlfullname]} i'm getting error for main column name but the data is displayed -


    If I remove <{$_language[tlfullname]} it works - it shows the following
    Ticket ID / Last update / [blank] / Last replier / Department / Type / Status

    HTML:
    <div class="boxcontainer">
                <div class="boxcontainerlabel"><{if $_resolvedTicketCount > 0 && $_showResolvedTickets == false}><div style="float: right"><div class="headerbutton" onclick="javascript:window.location.href = '<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Index/1';"><{$_language[viewresolvedt]}> (<{$_resolvedTicketCount}>)</div></div><{elseif $_showResolvedTickets == true}><div style="float: right"><div class="headerbutton" onclick="javascript:window.location.href = '<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Index/0';"><{$_language[hideresolvedt]}></div></div><{/if}><{$_language[ticketviewtickettitle]}></div>
    
                <div class="boxcontainercontent">
    
                    <table border="0" cellpadding="3" cellspacing="1" width="100%">
                    <tr>
                    <td class="ticketlistheaderrow" align="left" valign="middle" width="150"><{$_language[tlticketid]}></td>
                    <td class="ticketlistheaderrow" align="center" valign="middle" width="200"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/lastactivity/<{$_sortOrderFlip}>"><{$_language[tllastupdate]}>&nbsp;<{if $_sortBy == 'lastactivity'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                    <td class="ticketlistheaderrow" align="center" valign="middle" width="180"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/fullname/<{$_sortOrderFlip}>">&nbsp;<{if $_sortBy == 'fullname'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                    <td class="ticketlistheaderrow" align="center" valign="middle" width="120"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/lastreplier/<{$_sortOrderFlip}>"><{$_language[tllastreplier]}>&nbsp;<{if $_sortBy == 'lastreplier'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                    <td class="ticketlistheaderrow" align="center" valign="middle" width="180"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/department/<{$_sortOrderFlip}>"><{$_language[tldepartment]}>&nbsp;<{if $_sortBy == 'departmentid'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                    <td class="ticketlistheaderrow" align="center" valign="middle" width="120"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/type/<{$_sortOrderFlip}>"><{$_language[tltype]}>&nbsp;<{if $_sortBy == 'tickettypeid'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                    <td class="ticketlistheaderrow" align="center" valign="middle" width="120"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/status/<{$_sortOrderFlip}>"><{$_language[tlstatus]}>&nbsp;<{if $_sortBy == 'ticketstatusid'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                    <td class="ticketlistheaderrow" align="center" valign="middle" width="120"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/priority/<{$_sortOrderFlip}>"><{$_language[tlpriority]}>&nbsp;<{if $_sortBy == 'priorityid'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                    </tr>
    
                    <{foreach key=_ticketID item=_ticket from=$_ticketContainer}>
                    <tr>
                    <td class="ticketlistsubject" align="left" valign="middle" colspan="7"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/Ticket/View/<{$_ticket[ticketid]}>"><{$_ticket[subject]}></a></td>
                    </tr>
                    <tr class="ticketlistproperties" style="background: <{$_ticket[statusbgcolor]}>;">
                    <td class="ticketlistpropertiescontainer" align="left" valign="middle"><{$_ticket[displayticketid]}></td>
                    <td class="ticketlistpropertiescontainer" align="center" valign="middle"><{$_ticket[lastactivity]}></td>
                    <td class="ticketlistpropertiescontainer" align="center" valign="middle"><{$_ticket[fullname]}></td>
                    <td class="ticketlistpropertiescontainer" align="center" valign="middle"><{$_ticket[lastreplier]}></td>
                    <td class="ticketlistpropertiescontainer" align="center" valign="middle"><{$_ticket[department]}></td>
                    <td class="ticketlistpropertiescontainer" align="center" valign="middle"><{$_ticket[type]}></td>
                    <td class="ticketlistpropertiescontainer" align="center" valign="middle"><{$_ticket[status]}></td>
                    <td class="ticketlistpropertiescontainer" style="background: <{$_ticket[prioritybgcolor]}>;" align="center" valign="middle"><{$_ticket[priority]}></td>
                    </tr>
                    <tr class="ticketlistpropertiesdivider">
                    <td colspan="7">&nbsp;</td>
                    </tr>
                    <{/foreach}>
    
                    </table>
                </div>
                <div class="paginationcontainer">
                    <table border="0" cellpadding="3" cellspacing="1" class="paginationborder">
                        <tr><{$_paginationHTML}></tr>
                    </table>
                </div>
                </div>
     

    Attached Files:

  2. Gurpreet Singh

    Gurpreet Singh Staff Member

    Hello Lineup!

    Please try this code:

    HTML:
    <div class="boxcontainer">
                <div class="boxcontainerlabel"><{if $_resolvedTicketCount > 0 && $_showResolvedTickets == false}><div style="float: right"><div class="headerbutton" onclick="javascript:window.location.href = '<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Index/1';"><{$_language[viewresolvedt]}> (<{$_resolvedTicketCount}>)</div></div><{elseif $_showResolvedTickets == true}><div style="float: right"><div class="headerbutton" onclick="javascript:window.location.href = '<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Index/0';"><{$_language[hideresolvedt]}></div></div><{/if}><{$_language[ticketviewtickettitle]}></div>
    
                <div class="boxcontainercontent search-results">
    
                    <table border="0" cellpadding="3" cellspacing="1" width="100%">
                        <thead>
                            <tr>
                            <td class="ticketlistheaderrow" align="left" valign="middle" width="150"><{$_language[tlticketid]}></td>
                                                    <td class="ticketlistheaderrow" align="left" valign="middle" width="150">Created By</td>
                            <td class="ticketlistheaderrow" align="center" valign="middle" width="200"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/lastactivity/<{$_sortOrderFlip}>"><{$_language[tllastupdate]}>&nbsp;<{if $_sortBy == 'lastactivity'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                            <td class="ticketlistheaderrow" align="center" valign="middle" width=""><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/lastreplier/<{$_sortOrderFlip}>"><{$_language[tllastreplier]}>&nbsp;<{if $_sortBy == 'lastreplier'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                            <td class="ticketlistheaderrow" align="center" valign="middle" width="180"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/department/<{$_sortOrderFlip}>"><{$_language[tldepartment]}>&nbsp;<{if $_sortBy == 'departmentid'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                            <td class="ticketlistheaderrow" align="center" valign="middle" width="120"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/type/<{$_sortOrderFlip}>"><{$_language[tltype]}>&nbsp;<{if $_sortBy == 'tickettypeid'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                            <td class="ticketlistheaderrow" align="center" valign="middle" width="120"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/status/<{$_sortOrderFlip}>"><{$_language[tlstatus]}>&nbsp;<{if $_sortBy == 'ticketstatusid'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                            <td class="ticketlistheaderrow" align="center" valign="middle" width="120"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/ViewList/Sort/priority/<{$_sortOrderFlip}>"><{$_language[tlpriority]}>&nbsp;<{if $_sortBy == 'priorityid'}><{if $_sortOrder == 'asc'}><img src="<{$_themePath}>images/sortasc.gif" border="0"/><{elseif $_sortOrder == 'desc'}><img src="<{$_themePath}>images/sortdesc.gif" border="0"/><{/if}><{/if}></a></td>
                            </tr>
                        </thead>
                        <tbody>
                            <{foreach key=_ticketID item=_ticket from=$_ticketContainer}>
                            <tr>
                            <td class="ticketlistsubject" align="left" valign="middle" colspan="7"><a href="<{$_baseName}><{$_templateGroupPrefix}>/Tickets/Ticket/View/<{$_ticket[ticketid]}>"><{$_ticket[subject]}></a></td>
                            </tr>
                            <tr class="ticketlistproperties" style="background: <{$_ticket[statusbgcolor]}>;">
                            <td class="ticketlistpropertiescontainer" data-label="<{$_language[tlticketid]}>" align="left" valign="middle"><{$_ticket[displayticketid]}></td>
                                                    <td class="ticketlistpropertiescontainer" data-label="Fullname" align="left" valign="middle"><{$_ticket[fullname]}></td>
                            <td class="ticketlistpropertiescontainer" data-label="<{$_language[tllastupdate]}>" align="center" valign="middle"><{$_ticket[lastactivity]}></td>
                            <td class="ticketlistpropertiescontainer" data-label="<{$_language[tllastreplier]}>" align="center" valign="middle"><{$_ticket[lastreplier]}></td>
                            <td class="ticketlistpropertiescontainer" data-label="<{$_language[tldepartment]}>" align="center" valign="middle"><{$_ticket[department]}></td>
                            <td class="ticketlistpropertiescontainer" data-label="<{$_language[tltype]}>" align="center" valign="middle"><{$_ticket[type]}></td>
                            <td class="ticketlistpropertiescontainer" data-label="<{$_language[tlstatus]}>" align="center" valign="middle"><{$_ticket[status]}></td>
                            <td class="ticketlistpropertiescontainer" data-label="<{$_language[tlpriority]}>" style="background: <{$_ticket[prioritybgcolor]}>;" align="center" valign="middle"><{$_ticket[priority]}></td>
                            </tr>
                            <tr class="ticketlistpropertiesdivider">
                            <td colspan="7">&nbsp;</td>
                            </tr>
                            <{/foreach}>
                        </tbody>
                    </table>
    
                </div>
                <div class="paginationcontainer">
                    <table border="0" cellpadding="3" cellspacing="1" class="paginationborder">
                        <tr><{$_paginationHTML}></tr>
                    </table>
                </div>
                </div>
    It will display the Created by as shown in the attached file.

    Hope it helps!
     

    Attached Files:

  3. Lineup

    Lineup New Member

    Hi Gurpreet,
    Thanks, this works.
     

Share This Page