How to get the section number?

Jump to: navigation, search

Is it possible to get a number of section? Like numbers in the table of contents (TOC)?

For example, these sections:

== One ==
== Three ==
== Two ==

displays following TOC:

Contents [hide]
1 One
2 Three
3 Two

I would like to automatically get the number of section in the link by some Magic Word or something else, like this:

[[#One|{{SOMEMAGIC}}]], [[#Two|{{SOMEMAGIC}}]], [[#Three|{{SOMEMAGIC}}]]

should give the following output:

1, 3, 2

Best regards,

Scottie33 (talk)10:42, 22 August 2012