User:Lirion/Sandbox/Squad: Difference between revisions
From Hattrick
< User:Lirion | Sandbox
mNo edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{| class="wikitable sortable" border="2" style="border-color:#aaa;border-collapse:collapse;" cellspacing="0" cellpadding="2" | {| class="wikitable sortable" border="2" style="border-color:#aaa;border-collapse:collapse;" cellspacing="0" cellpadding="2" | ||
|- style="background-color:#cdb;" | |- style="background-color:#cdb;" | ||
!No. !! Pos. !! Nat. !! Name !! Matches !! Ranking | !No. !! Pos. !! Nat. !! Name !! Matches !!class="unsortable| Ranking | ||
|- | |- | ||
{{#if: {{{1name|}}} | | {{#if: {{{1name|}}} | | ||
| Line 9: | Line 9: | ||
{{!!}}{{{1name}}} | {{!!}}{{{1name}}} | ||
{{!!}}{{{1mtch|-}}} | {{!!}}{{{1mtch|-}}} | ||
{{!!}}{{User:Lirion/Sandbox/Ranking|{{{1rank}}}}} | {{!!}}{{SortKey|{{{1rank}}}}}{{User:Lirion/Sandbox/Ranking|{{{1rank}}}}} | ||
{{!}}- |}} | {{!}}- |}} | ||
{{#if: {{{2name|}}} | | {{#if: {{{2name|}}} | | ||
{{!}}style="text-align:right;"{{!}}{{{2no|-}}} | {{!}}style="text-align:right;"{{!}}{{{2no|-}}} | ||
{{!!}}{{{2pos|?}}} | {{!!}}{{{2pos|?}}} | ||
{{!!}}{{ flagicon|{{{2nat|}}} }} | {{!!}}{{SortKey|{{{2nat}}}}}{{ flagicon|{{{2nat|}}} }} | ||
{{!!}}{{{2name}}} | {{!!}}{{{2name}}} | ||
{{!!}}{{{2mtch|-}}} | {{!!}}{{{2mtch|-}}} | ||
{{!!}}{{User:Lirion/Sandbox/Ranking|{{{2rank}}}}} | {{!!}}{{SortKey|{{{2rank}}}}}{{User:Lirion/Sandbox/Ranking|{{{2rank}}}}} | ||
{{!}}- |}} | {{!}}- |}} | ||
{{#if: {{{3name|}}} | | {{#if: {{{3name|}}} | | ||
{{!}}style="text-align:right;"{{!}}{{{3no|-}}} | {{!}}style="text-align:right;"{{!}}{{{3no|-}}} | ||
{{!!}}{{{3pos|?}}} | {{!!}}{{{3pos|?}}} | ||
{{!!}}{{ flagicon|{{{3nat|}}} }} | {{!!}}{{SortKey|{{{3nat}}}}}{{ flagicon|{{{3nat|}}} }} | ||
{{!!}}{{{3name}}} | {{!!}}{{{3name}}} | ||
{{!!}}{{{3mtch|-}}} | {{!!}}{{{3mtch|-}}} | ||
{{!!}}{{User:Lirion/Sandbox/Ranking|{{{3rank}}}}} | {{!!}}{{SortKey|{{{3rank}}}}}{{User:Lirion/Sandbox/Ranking|{{{3rank}}}}} | ||
{{!}}- |}} | {{!}}- |}} | ||
{{#if: {{{4name|}}} | | {{#if: {{{4name|}}} | | ||
Revision as of 23:08, 21 July 2010
| No. | Pos. | Nat. | Name | Matches | Ranking |
|---|
Documentation
Due to no loop abaility of this MediaWiki so far, we have to use an if expression for each possible row/player (sic). Any other variable can be left blank.
You have to provide at least the name for each player you want to insert. Variables are:
| nname | Player name, mandatory |
| nno | Player kit number |
| npos | Player position, e.g. GK |
| nnat | Player nationality - provide a value Template:flagicon can interpret |
| nmtch | Played matches |
...whereas n is the number of the player, i.e. you take care of the initial sorting.
Later Replacement with far less text
Until we have no true loop function, ignore this:
{{ #for: n |
| No. | Pos. | Nat. | Name | Matches |
|---|---|---|---|---|
| {{{$n$no}}} | {{{$n$pos}}} | {{{$n$nat}}} | {{{$n$name}}} | {{{$n$match}}} |
}}