Template:Pledge: Difference between revisions
From London Hackspace Wiki
m (fix) |
(test) |
||
Line 2: | Line 2: | ||
|- | |- | ||
! Name !! Pledged | ! Name !! Pledged | ||
{{#if: {{{name1|}}}| | {{#if: {{{name1|}}}|{{!}}-{{!}} [[User:{{{name1}}}|{{{name1}}}]] {{!}}{{!}} £{{{pledge1|}}} | ||
{{!}}- | {{#if: {{{name2|}}}|{{!}}-{{!}} [[User:{{{name2}}}]] {{!}}{{!}} £{{{pledge2|}}}|}} | ||
{{!}} {{{name1}}} {{!}}{{!}} £{{{pledge1|}}} | {{#if: {{{name3|}}}|{{!}}-{{!}} [[User:{{{name3}}}]] {{!}}{{!}} £{{{pledge3|}}}|}} | ||
{{#if: {{{name2|}}}| | |||
{{!}}- | |||
{{!}} {{{name2}}} {{!}}{{!}} £{{{pledge2|}}}|}} | {{#if: {{{name4|}}}| | ||
{{#if: {{{name3|}}}| | |||
{{!}}- | |||
{{!}} {{{name3}}} {{!}}{{!}} £{{{pledge3|}}}|}}{{#if: {{{name4|}}}| | |||
{{!}}- | {{!}}- | ||
{{!}} {{{name4}}} {{!}}{{!}} £{{{pledge4|}}}|}}{{#if: {{{name5|}}}| | {{!}} {{{name4}}} {{!}}{{!}} £{{{pledge4|}}}|}}{{#if: {{{name5|}}}| |
Revision as of 17:19, 1 May 2013
Name | Pledged |
---|
Target: £0
Total: £0
Needed: £0
Usage
{{pledge| target=
|name1= | pledge1=
|name2= | pledge2=
|name3= | pledge3=
|name4= | pledge4=
|name5= | pledge5=
}}
This template can currently handle 20 pledges, though it can be extended for more.
Example
{{pledge| target=50
|name1=Joe | pledge1=10
|name2=Jane | pledge2=15
|name3=John | pledge3=5
|name4= | pledge4=
|name5= | pledge5=
}}
will result in this:
Name | Pledged |
---|
Target: £50
Total: £30
Needed: £20
The above documentation is transcluded from Template:Pledge/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |