Board Thread:Support Requests - Getting Technical/@comment-24171593-20161102100120/@comment-9605025-20161104064948

Fandyllic has proposed what is probably the best answer for the long-run. However, if you are not ready for that yet and still want to get the template working, I think I found another way you can shorten it.

The outermost #expr performs the summation just as before. The next level of nested parser functions (#if and #ifexpr) provide the expression to be evaluated. Because of the way #if and #ifexpr work, an input value evaluated to be "false" will result in nothing concatenated to the expression. In contrast, an input value evaluated to be "true" will result in "+1" being concatenated to the existing expression. This will result in either "0" or "0+1+1+1+1+.....+1". The #if functions work as before but the #ifexpr works a bit differently. Previously, we tallied the subcomponents and checked to see if the sum was equal to the total number of subcomponents. In the new case, we use binary ("true/false") values directly. This eliminates the need for the intermediate #expr. Note that the #if parser functions use "1", a Boolean value, rather than "+1".