Template:Par2b
(default none)
Variant of Template:Par2 for testing. Test page here: User:Raffriff42/sandbox.
Would like to use a conditional test for the presence of argument {{{3}}}, to hide "default ..." when there IS no default. See "intended sample output" below.
{{#if:{{{3|}}}| (default '''{{{3}}}''')|}}
This code DOES NOT WORK due to lack of mediawiki Extension:ParserFunctions
Even if the extension were installed, this code would not work if template parameter {{{3}}} is not empty, but ' ' (space) ...which it is, on many, many pages.
So, we might as well create two templates - something like {{Par2d|...}} (with "default...") and {{Par2n|...}} (no default). Would require editing almost every filter page - but the edits would be quick & easy.
Raffriff42 05:16, 26 December 2015 (CET)
...intended sample output:
Foo(clip [, float gain_y] [, int size] [, boolean autogain] [, string file])
- clip
- Input clip
- float gain_y (default 2)
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eros nulla, fringilla fringilla diam id, luctus dapibus nibh.
- int size (default 24)
- Cras in mauris ac eros mollis pellentesque non non metus. Proin vitae mauris tempor, tristique sem vitae, suscipit ante.
- bool autogain (default false)
- Integer mattis purus id fringilla malesuada. Cras justo sapien, tincidunt vel pharetra id, cursus at quam.
- string pixel_type (default "RGB32")
- Vivamus ipsum augue, rutrum eu nunc consectetur, rutrum sagittis neque. Sed erat ligula, ultricies id quam eleifend, maximus lacinia erat.