Using Template format to create a working expression

From semantic-mediawiki.org

I am trying to use the Template format type with intro and outro to create an #expr that adds up the results of my semantic query, but the #expr just prints out as text, it does not execute. It's a simple move to just add the list of property ranks from a valuerank query. I felt like I pulled it off, but I just wind up with this:

{{#expr: 0 + 14 + 5 + 4 + 3 + 3}}

Is it possible to get this expression to execute and give me a total number as the printou while using the template format? or is there a better way to add up the instances of a Property printout and get a total count? I am all ears.

15:30, 17 July 2015

> #expr just prints out as text, it does not execute

I'm guessing (the description isn't clear about this) that you are using the template to generate an output similar to Intro -> {{#expr: Query -> 0 + 14 + 5 + 4 + 3 + 3 Outro -> }} which will be a text component and not a parser expression (even though it appears as a normal expression).

> to execute and give me a total number as the printou while using the template format?

The template format used to create a tabular output combined with math formats might help.

16:05, 17 July 2015

Yes you pretty much nailed it. My intro was declaring {{#expr: 0 -> my template was -> + {{{rank}}} and my outro closed it up -> }}. It looks like that math function demo may help we get to where I need to be. I am going to check that out. Thanks!

16:46, 17 July 2015