Topic on Extension talk:NumerAlpha

how to reset counter to 1 when using SRF

2
Summary by Revansx

solved using {{#expr:({{#counter:listcount}}-1)}} in the template called by SRF. It would be nice if the counter could truly be reset to 0 outside of the SRF calls.

Revansx (talkcontribs)

I have a simple semantic query such as

{{#ask:
[[Category:Foo]]
|?format=template
|?template=orderedtable
}}

where the template used the <in /> to enumerate the results.

Question is how does one "reset" the counter on the page so that the next inline query, say

{{#ask:
[[Category:Bar]]
|?format=template
|?template=orderedtable
}}

starts with "1". Thanks!

Revansx (talkcontribs)

by using

<span style="display:none;visibility:hidden;">{{#counter:listcount|type=numeral|set=0}}</span>
{{#ask:
[[Category:Bar]]
|?format=template
|?template=orderedtable
}}

and {{#counter:listcount}} in the template called by SRF, the best I can get is for each list in the page to start at "2".