Some sort of add function?

Russ

Well-known member
Is there some way that I can combine these 2 totals :

{$session.moderationCounts.total}
{$session.reportCounts.total}

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:

Russ

Well-known member
There is a xen:calc function but I'm not sure if it can do that.

Thanks Brogan pointed me in the right direction:

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

Appears to work.
 
Top