(undo redirect testing) |
(noted code, added support for noanchor=yes, up to four non displayed anchors anchor1, anchor2 ..., update and added(optional) split dates display) |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{Doc}} | {{Doc}} | ||
</noinclude><includeonly>|- valign="top" {{anchor|{{{term|}}}{{#if:{{{1|}}}|{{!}}{{{1|}}}}}{{#if:{{{2|}}}|{{!}}{{{2|}}}}}{{#if:{{{3|}}}|{{!}}{{{3|}}}}}{{#if:{{{4|}}}|{{!}}{{{4|}}}}}}} | </noinclude><includeonly><!-- Begin template code | ||
| '''{{{term|}}}''' | -->|- valign="top" <!-- Start new table row | ||
| {{Trim|{{{1|}}}}}{{#if:{{{2|}}}|,}} {{Trim|{{{2|}}}}}{{#if:{{{3|}}}|,}} {{Trim|{{{3|}}}}}{{#if:{{{4|}}}|,}} {{Trim|{{{4|}}}}} | -->{{#ifeq:{{{noanchor|}}}|yes|<!-- If "noanchor" is set to yes, don't output any anchors | ||
| {{{desc|}}} | -->|<!-- If not output an anchor starting with the term name -->{{anchor|{{{term|}}}<!-- Then if up to 4 additional aliases are present | ||
|<small><small> {{{ | -->{{#if:{{{1|}}}|<!-- add then to the anchor preceded by a pipe -->{{!}}{{{1|}}}<!-- End IF for 1st alias -->}}<!-- repeat 3 more times | ||
-->{{#if:{{{2|}}}|{{!}}{{{2|}}}}}{{#if:{{{3|}}}|{{!}}{{{3|}}}}}{{#if:{{{4|}}}|{{!}}{{{4|}}}}}{{#if:{{{anchor1|}}}|{{!}}{{{anchor1|}}}}}<!-- if up to 4 non display anchors are specified, add them to the anchor | |||
-->{{#if:{{{anchor2|}}}|{{!}}{{{anchor2|}}}}}{{#if:{{{anchor3|}}}|{{!}}{{{anchor3|}}}}}{{#if:{{{anchor4|}}}|{{!}}{{{anchor4|}}}}}<!-- | |||
end anchor -->}}<!-- | |||
end IF "noanchor" -->}} | |||
| '''{{{term|}}}'''<!-- Fill first cell of row with "term" --> | |||
| <!-- use trim for unnamed parameters to eliminate extra whitespace | |||
-->{{Trim| {{{1|}}} }}<!-- fill second cell with 1st alias | |||
-->{{#if:{{{2|}}}<!-- if there's a second alias --> | |||
|,}}<!-- then place a comma --> | |||
{{Trim|{{{2|}}}}}<!-- followed by the second alias | |||
-->{{#if:{{{3|}}}|,}} {{Trim|{{{3|}}}}}{{#if:{{{4|}}}|,}} {{Trim|{{{4|}}}}} <!-- repeat for up to 4 aliases --> | |||
| {{{desc|}}} <!-- place the description in the third cell --> | |||
|<small><small> {{{updated|}}}{{#if:{{{added|}}}|<br> | |||
{{{added|}}}}} </small></small><!-- place the last updated date followed the date added on the next line if specified in the 4th cell --></includeonly> |
Revision as of 08:55, 8 February 2015
Template documentation[create]
Please add categories to the /doc subpage. Subpages of this template. |