1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Some sort of add function?

Discussion in 'Styling and Customization Questions' started by Russ, Jun 21, 2013.

  1. Russ

    Russ Well-Known Member

    Is there some way that I can combine these 2 totals :


    I know this is wrong but ideally something like this:

    {xen:total {$session.moderationCounts.total} AND {$session.reportCounts.total}

    I'm combining reports and mod for a little template mod and need those to combine. Hope it makes sense... :)

    I've tried searching with no luck BTW
    Last edited: Jun 21, 2013
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is a xen:calc function but I'm not sure if it can do that.
    Russ likes this.
  3. Russ

    Russ Well-Known Member

    Thanks Brogan pointed me in the right direction:

    {xen:calc '{xen:raw $session.moderationCounts.total} + {xen:raw $session.reportCounts.total}'}

    Appears to work.
    Brogan likes this.

Share This Page