Variable Tickets Counts "Total" Moderator Bar

Discussion in 'Discussion' started by Freelancer, Sep 23, 2017.

  1. Freelancer

    Freelancer Well-Known Member

    I need to know the variable of the Ticket Count total for the session, to add it to another total...

    I thought it would be
    Code:
    {$session.ticketCounts.total}
    but that does not seem to work...

    @NixFifty do you have a hint for me?
     
  2. NixFifty

    NixFifty Administrator Staff Member

    I’m away from my machine at the moment but that looks correct to me.

    There’s an nf_tickets_moderator_bar template which contains the actual variable names you can check to make sure.
     
    Freelancer likes this.
  3. Freelancer

    Freelancer Well-Known Member

    Thanks for the fast reply. I checked and yes it is correct: {$session.ticketCounts.total} is the variable in the template but it does not work with my template

    Code:
    <xen:set var="$moderatorHiddenUnread" value="{xen:calc '{$session.moderationCounts.total} + {$session.userModerationCounts.total} + {$session.reportCounts.total} + {$session.ticketCounts.total} + {$session.modLogCounts.total}'}" />
    Maybe you have an idea why this does not add up in the "moderator_bar" template...
    Code:
    <span class="Total">{xen:number $moderatorHiddenUnread}</span>
     
  4. Freelancer

    Freelancer Well-Known Member

    I fixed this! It was a template issue.
     
    NixFifty likes this.
  5. NixFifty

    NixFifty Administrator Staff Member

    My bad, missed your response. Glad you got it though. :)