There was a freemarker in front of me. I did not cherish, met the velocity I just remembered the lost beautiful ...
Demand is the PC page click, Mobile Web click, app click Add to get total clicks show out:
$article. hits+ $article. waphits+ $article. mobilehits
Ideal is very good, the reality of output is: Number+number+number a large string (like that year. When you use the Freemarker. Add and subtract operations directly on, and now ... )
It is said that you need to add a space on both sides of the arithmetic. All right. Try the following:
$article. Hits + $article. Waphits + $article. mobilehits
The velocity is not recognized. Give me the same output large string. I think of the lost Freemarker, the ear sounded "lost beautiful"
Well, then use the ultimate skill (put the operation in the velocity script):
#set ($total = $article. Hits + $article. Waphits + $article. mobilehits) $total
Yes, I can, Commit ...
Myths about velocity plus subtraction and other arithmetic