Template:Loop 2
{{loop {{{2}}}|{{{1}}}0|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8}}}|}} {{loop {{{2}}}|{{{1}}}1|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8}}}|}}
This template provides an example of how repetition within a page can be achieved, where copies of the same template are used for different loop levels (formerly a redirect could be used for each level, but that gives the error message "Template loop detected" now). The number of levels that the template can handle is determined by the number of parameters specified in the two template calls it comprises (because going up a level requires an extra parameter) and the number of existing copies, see [1].
Usage
[edit]{{loop 1|a}} ---- {{loop 2|a|1||||||}} ---- {{loop 3|a|2|1|||||}} ---- {{loop 4|a|3|2|1||||}} ---- {{loop 5|a|4|3|2|1|||}} ---- {{loop 6|a|5|4|3|2|1||}} ---- {{loop 7|a|6|5|4|3|2|1|}} ---- {{loop 8|a|7|6|5|4|3|2|1}}
gives:
a000 a001 a010 a011 a100 a101 a110 a111
a0000 a0001 a0010 a0011 a0100 a0101 a0110 a0111 a1000 a1001 a1010 a1011 a1100 a1101 a1110 a1111
a00000 a00001 a00010 a00011 a00100 a00101 a00110 a00111 a01000 a01001 a01010 a01011 a01100 a01101 a01110 a01111 a10000 a10001 a10010 a10011 a10100 a10101 a10110 a10111 a11000 a11001 a11010 a11011 a11100 a11101 a11110 a11111
a000000 a000001 a000010 a000011 a000100 a000101 a000110 a000111 a001000 a001001 a001010 a001011 a001100 a001101 a001110 a001111 a010000 a010001 a010010 a010011 a010100 a010101 a010110 a010111 a011000 a011001 a011010 a011011 a011100 a011101 a011110 a011111 a100000 a100001 a100010 a100011 a100100 a100101 a100110 a100111 a101000 a101001 a101010 a101011 a101100 a101101 a101110 a101111 a110000 a110001 a110010 a110011 a110100 a110101 a110110 a110111 a111000 a111001 a111010 a111011 a111100 a111101 a111110 a111111
a0000000 a0000001 a0000010 a0000011 a0000100 a0000101 a0000110 a0000111 a0001000 a0001001 a0001010 a0001011 a0001100 a0001101 a0001110 a0001111 a0010000 a0010001 a0010010 a0010011 a0010100 a0010101 a0010110 a0010111 a0011000 a0011001 a0011010 a0011011 a0011100 a0011101 a0011110 a0011111 a0100000 a0100001 a0100010 a0100011 a0100100 a0100101 a0100110 a0100111 a0101000 a0101001 a0101010 a0101011 a0101100 a0101101 a0101110 a0101111 a0110000 a0110001 a0110010 a0110011 a0110100 a0110101 a0110110 a0110111 a0111000 a0111001 a0111010 a0111011 a0111100 a0111101 a0111110 a0111111 a1000000 a1000001 a1000010 a1000011 a1000100 a1000101 a1000110 a1000111 a1001000 a1001001 a1001010 a1001011 a1001100 a1001101 a1001110 a1001111 a1010000 a1010001 a1010010 a1010011 a1010100 a1010101 a1010110 a1010111 a1011000 a1011001 a1011010 a1011011 a1011100 a1011101 a1011110 a1011111 a1100000 a1100001 a1100010 a1100011 a1100100 a1100101 a1100110 a1100111 a1101000 a1101001 a1101010 a1101011 a1101100 a1101101 a1101110 a1101111 a1110000 a1110001 a1110010 a1110011 a1110100 a1110101 a1110110 a1110111 a1111000 a1111001 a1111010 a1111011 a1111100 a1111101 a1111110 a1111111
a00000000 a00000001 a00000010 a00000011 a00000100 a00000101 a00000110 a00000111 a00001000 a00001001 a00001010 a00001011 a00001100 a00001101 a00001110 a00001111 a00010000 a00010001 a00010010 a00010011 a00010100 a00010101 a00010110 a00010111 a00011000 a00011001 a00011010 a00011011 a00011100 a00011101 a00011110 a00011111 a00100000 a00100001 a00100010 a00100011 a00100100 a00100101 a00100110 a00100111 a00101000 a00101001 a00101010 a00101011 a00101100 a00101101 a00101110 a00101111 a00110000 a00110001 a00110010 a00110011 a00110100 a00110101 a00110110 a00110111 a00111000 a00111001 a00111010 a00111011 a00111100 a00111101 a00111110 a00111111 a01000000 a01000001 a01000010 a01000011 a01000100 a01000101 a01000110 a01000111 a01001000 a01001001 a01001010 a01001011 a01001100 a01001101 a01001110 a01001111 a01010000 a01010001 a01010010 a01010011 a01010100 a01010101 a01010110 a01010111 a01011000 a01011001 a01011010 a01011011 a01011100 a01011101 a01011110 a01011111 a01100000 a01100001 a01100010 a01100011 a01100100 a01100101 a01100110 a01100111 a01101000 a01101001 a01101010 a01101011 a01101100 a01101101 a01101110 a01101111 a01110000 a01110001 a01110010 a01110011 a01110100 a01110101 a01110110 a01110111 a01111000 a01111001 a01111010 a01111011 a01111100 a01111101 a01111110 a01111111 a10000000 a10000001 a10000010 a10000011 a10000100 a10000101 a10000110 a10000111 a10001000 a10001001 a10001010 a10001011 a10001100 a10001101 a10001110 a10001111 a10010000 a10010001 a10010010 a10010011 a10010100 a10010101 a10010110 a10010111 a10011000 a10011001 a10011010 a10011011 a10011100 a10011101 a10011110 a10011111 a10100000 a10100001 a10100010 a10100011 a10100100 a10100101 a10100110 a10100111 a10101000 a10101001 a10101010 a10101011 a10101100 a10101101 a10101110 a10101111 a10110000 a10110001 a10110010 a10110011 a10110100 a10110101 a10110110 a10110111 a10111000 a10111001 a10111010 a10111011 a10111100 a10111101 a10111110 a10111111 a11000000 a11000001 a11000010 a11000011 a11000100 a11000101 a11000110 a11000111 a11001000 a11001001 a11001010 a11001011 a11001100 a11001101 a11001110 a11001111 a11010000 a11010001 a11010010 a11010011 a11010100 a11010101 a11010110 a11010111 a11011000 a11011001 a11011010 a11011011 a11011100 a11011101 a11011110 a11011111 a11100000 a11100001 a11100010 a11100011 a11100100 a11100101 a11100110 a11100111 a11101000 a11101001 a11101010 a11101011 a11101100 a11101101 a11101110 a11101111 a11110000 a11110001 a11110010 a11110011 a11110100 a11110101 a11110110 a11110111 a11111000 a11111001 a11111010 a11111011 a11111100 a11111101 a11111110 a11111111