Difference between revisions of "Template:Term/ListingNameTemplate"
From Maths
m |
(Should work now) |
||
Line 1: | Line 1: | ||
− | + | {{#if:{{{t|}}}{{{s|}}}<!--if either are non-empty | |
+ | |||
+ | |||
+ | -->|{{{1|}}} ({{~targ|1={{{s|}}}|2={{ucfirst:{{{t|}}}}} Theory}})<!-- | ||
+ | |||
+ | just output arg 1 if not (both s t are empty)-->|{{{1|}}}<!-- | ||
+ | |||
+ | end | ||
+ | -->}}<noinclude> | ||
==Changelog== | ==Changelog== | ||
* First version [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 12:26, 3 February 2018 (UTC) | * First version [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 12:26, 3 February 2018 (UTC) | ||
** Forgot brackets around subject [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 12:29, 3 February 2018 (UTC) | ** Forgot brackets around subject [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 12:29, 3 February 2018 (UTC) | ||
* Using the new [[Template:~targ]] we replace the {{C|<nowiki>{{{a|f({{{b|}}})}}}</nowiki>}}-type logic, as if we have {{C|<nowiki>|a=|b=...|</nowiki>}} in the caller {{C|a}}, although empty, is still defined, thus {{C|<nowiki>{{{a|...}}}</nowiki>}} will always become the empty string in this case. [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 17:38, 3 February 2018 (UTC) | * Using the new [[Template:~targ]] we replace the {{C|<nowiki>{{{a|f({{{b|}}})}}}</nowiki>}}-type logic, as if we have {{C|<nowiki>|a=|b=...|</nowiki>}} in the caller {{C|a}}, although empty, is still defined, thus {{C|<nowiki>{{{a|...}}}</nowiki>}} will always become the empty string in this case. [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 17:38, 3 February 2018 (UTC) | ||
+ | * use of the "nowiki" tags messes up the space I need to be shown, so I need to find another way to do it. [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 18:32, 3 February 2018 (UTC) | ||
+ | ==Final initial version== | ||
+ | The version after what follows was a complete re-write: | ||
+ | * {{C|1=<nowiki>{{{1|}}}{{#if:{{~targ|1={{{s|}}}<!--DEFAULT-->|2={{#if:{{{t|}}}|{{ucfirst:{{{t|}}}}} Theory|}}<!--END DEFAULT-->}}<!--first if term end-->|{{space}}({{~targ|1={{{s|}}}<!--start-->|2={{#if:{{{t|}}}|{{ucfirst:{{{t|}}}}} Theory|}}<!--end-->}})|}}</nowiki>}} | ||
</noinclude> | </noinclude> |
Latest revision as of 18:32, 3 February 2018
Changelog
- First version Alec (talk) 12:26, 3 February 2018 (UTC)
- Using the new Template:~targ we replace the {{{a|f({{{b|}}})}}}-type logic, as if we have |a=|b=...| in the caller a, although empty, is still defined, thus {{{a|...}}} will always become the empty string in this case. Alec (talk) 17:38, 3 February 2018 (UTC)
- use of the "nowiki" tags messes up the space I need to be shown, so I need to find another way to do it. Alec (talk) 18:32, 3 February 2018 (UTC)
Final initial version
The version after what follows was a complete re-write:
- {{{1|}}}{{#if:{{~targ|1={{{s|}}}<!--DEFAULT-->|2={{#if:{{{t|}}}|{{ucfirst:{{{t|}}}}} Theory|}}<!--END DEFAULT-->}}<!--first if term end-->|{{space}}({{~targ|1={{{s|}}}<!--start-->|2={{#if:{{{t|}}}|{{ucfirst:{{{t|}}}}} Theory|}}<!--end-->}})|}}