User:Ham105/sandbox/p5/doc

Examples

 * {{Aligned table

|cols=3 |class=wikitable |style=border:1; cellpadding:4; margin:0.5em; width:95%; |col2nowrap=on | Code | Output | Remarks | {{Tlg|nna|Matt Burke|nolink=on}} | {{User:Ham105/sandbox/p10 |Matt Burke}} | surname | {{Tlg|nna|Matthew Burke (rugby, born 1964)|nolink=on}} | {{User:Ham105/sandbox/p10 |Matthew Burke (rugby, born 1964)}} | ... for page title with disambiguation | {{Tlg|nna|Liz Cambage||||nolink=on}} | {{User:Ham105/sandbox/p10 |Liz Cambage|||}} | ... no link | {{Tlg|nna|Nick Farr-Jones}} | {{User:Ham105/sandbox/p10 |Nick Farr-Jones}} | hyphenated | {{Tlg|nna|Heather O'Reilly|nolink=on}} | {{User:Ham105/sandbox/p10 |Heather O'Reilly}} | apostrophe | {{Tlg|nna|Edward Dunlop |E. E. }} | {{User:Ham105/sandbox/p10 |Edward Dunlop |E. E. }} | initials and surname | {{Tlg|nna|Enrique Rodríguez (rugby union) |E. E. }} | {{User:Ham105/sandbox/p10 |Enrique Rodríguez (rugby union) |E. E. }} | | {{Tlg|nna|Edward Dunlop |Weary }} | {{User:Ham105/sandbox/p10 |Edward Dunlop |Weary }} | nickname and surname | {{Tlg|nna|Enrique Rodríguez (rugby union) |Topo }} | {{User:Ham105/sandbox/p10 |Enrique Rodríguez (rugby union) |Topo }} | | {{Tlg|nna|Jharal Yow Yeh|Yow }} | {{User:Ham105/sandbox/p10 |Jharal Yow Yeh|Yow }} | surname with two parts | {{Tlg|nna|Marcel van der Merwe|Van der }}} | | ... three parts | } | | ... with initial | |  | married name with hyphenated addition FAIL | |  | ... no hyphen | |  | Inverted name: surname and initials FAIL | |  | ... with generational title FAIL | |  | initials, surname and generational title | |  | ... no link | {&#123;nna FAIL | | no parameters }}

Returning linked results
The template returns an internal link by default unless parameter 4 is defined.

Returning unlinked results
The template will return an unlinked result if parameter 4 is defined (even if empty).

Sandbox/p12
-->
 * |}}

Template data
{       "description": "The template takes the Full_name (of a person) and makes it shorter. In the simplest case the last name is returned, which usually corresponds to the person's surname. Initials etc, may be added by using the Name_prefix and Name_suffix options. The template returns a wikilinked result by default but this may be overridden by use of the No_link option.", "params": { "1": {                       "label": "Full_name", "description": "String containing a person's name; don't wikilink. Typically in the form of a Wikipedia page title with any necessary disambiguation appended in brackets so that the result of the template (if linked) points to the appropriate page.", "type": "string", "required": true },               "2": {                        "label": "Name_prefix", "description": "Text (e.g. initials, etc) to be prepended to the last name.", "type": "string", "required": false },               "3": {                        "label": "Name_suffix", "description": "Text (e.g. initials, etc) to be appended to the last name.", "type": "string", "required": false },               "4": {                        "label": "No_link", "description": "Determines whether or not a wikilinked result is returned. When this parameter is defined (even if empty) it will suppress the default addition of encapsulating double square brackets.", "type": "unknown", "default": "undefined", "required": false },               "5": {                        "label": "No_separator", "description": "When this parameter is defined (even if empty) it will suppress the addition of a default space character separator either side of the last name. Any alternate separator characters needed must then be included in Name_prefix and Name_suffix (called as unnamed parameters if there is a need to avoid whitespace trimming).", "type": "unknown", "default": "undefined", "required": false }       } }

Sandbox/p10
4 params: prefix and suffix options, with no additional space separator

Template data
{       "description": "The template takes the Full_name (of a person) and makes it shorter. In the simplest case the last name is returned, which usually corresponds to the person's surname. Initials etc, may be added by using the Name_prefix and Name_suffix options. The template returns a wikilinked result by default but this may be overridden by use of the No_link option.", "params": { "1": {                       "label": "Full_name", "description": "String containing a person's name; don't wikilink. Typically in the form of a Wikipedia page title with any necessary disambiguation appended in brackets so that the result of the template (if linked) points to the appropriate page.", "type": "string", "required": true },               "2": {                        "label": "Name_prefix", "description": "Text (e.g. initials, etc) to be prepended to the last name.", "type": "string", "required": false },               "3": {                        "label": "Name_suffix", "description": "Text (e.g. initials, etc) to be appended to the last name.", "type": "string", "required": false },               "4": {                        "label": "No_link", "description": "Determines whether or not a wikilinked result is returned. When this parameter is defined (even if empty) it will suppress the addition of encapsulating double square brackets.", "type": "unknown", "default": "undefined", "required": false }       } }

Nigel Ah Wong