Template:Row numbers/doc

This is a stop-gap template that serves as an interface to Module:Row numbers.

This template makes it possible, in many cases, to have an incrementing row indexer/counter in a table so that adding or removing rows automatically adjusts the numbering of subsequent rows. This template will become obsolete if and when MediaWiki supports automatically adding row numbers via WikiTable syntax. See Phab: - "jquery.tablesorter: Add support for a 'fixed' column of row numbers." And see Help:Sorting, and the sections on row numbering and auto-ranking. Using Template:Row numbers is one of the methods described on that page.

Usage
This template takes two parameters: the table and the starting index. There is a caveat: the table be wrapped inside  tags so that all of the pipe characters  required in a wiki table do not confuse the template into thinking that they are all individual template parameters. Internally, the Module maintains a monotonically increasing counter. The Module looks for the keywords  and   in the table. Keyword  is replaced with the next counter value; keyword   is replaced with the value from the last   replacement.

There are further caveats. When wrapped in , the ' ' and ' ' characters that begin and end all html-like markup, are replaced with  and   html entities respectively. Because the Module cannot know if there are html entities already in use before the table was wrapped in the  tags required here, when the module replaces the html entities with ' ' and ' ' characters, something may break. caveat lector.