User:Ham105/sandbox/p5/doc
This is a documentation subpage for User:Ham105/sandbox/p5. It may contain usage information, categories and other content that is not part of the original user template page. |
Examples
[edit]Code Output Remarks {{nna|Matt Burke}} Burke surname {{nna|Matthew Burke (rugby, born 1964)}} 1964) ... for page title with disambiguation {{nna|Liz Cambage}} Cambage ... no link {{nna|Nick Farr-Jones}} Farr-Jones hyphenated {{nna|Heather O'Reilly}} O'Reilly apostrophe {{nna|Edward Dunlop|E. E.}} E. E. Dunlop initials and surname {{nna|Enrique Rodríguez (rugby union)|E. E.}} E. E. union) {{nna|Edward Dunlop|Weary}} Weary Dunlop nickname and surname {{nna|Enrique Rodríguez (rugby union)|Topo}} Topo union) {{nna|Jharal Yow Yeh|Yow}} Yow Yeh surname with two parts {{nna|Marcel van der Merwe|Van der}}} Van der Merwe ... three parts {{nna|Marcel van der Merwe|M. van der}}} M. van der Merwe ... with initial {{nna|Glynis Nunn|-Cearns}} Nunn -Cearns married name with hyphenated addition FAIL {{nna|Salma Hayek|Pinault}} Hayek Pinault ... no hyphen {{nna|T. E. Lawrence|, T. E.}} Lawrence , T. E. Inverted name: surname and initials FAIL {{nna|Al Gore|, A. A., Jr.}} Gore , A. A., Jr. ... with generational title FAIL {{nna|Jakie Astor|J. J.|VII}} J. J. Astor VII initials, surname and generational title {{nna|William Rockefeller|W. A.|Jr.}} W. A. Rockefeller Jr. ... no link {{nna FAIL [[{{{1}}}| {{{1}}} ]] no parameters
Usage examples
[edit]Returning linked results
[edit]The template returns an internal link by default unless parameter 4 is defined.
Last name only – param 1
[edit]Markup | Rendering |
---|---|
{{nnn|Matt Burke}} | Burke |
{{nnn|Matthew Burke (rugby, born 1964)}} | 1964) |
{{nnn|Liz Cambage}} | Cambage |
{{nnn|Heather O'Reilly}} | O'Reilly |
Returning unlinked results
[edit]The template will return an unlinked result if parameter 4 is defined (even if empty).
Last name only – param 1 and 4
[edit]Markup | Rendering |
---|---|
{{nnn|Matt Burke}} | Burke |
{{nnn|Matthew Burke (rugby, born 1964)}} | 1964) |
{{nnn|Liz Cambage}} | Cambage |
{{nnn|Heather O'Reilly}} | O'Reilly |
Sandbox/p12
[edit]{{#ifeq: {{{4|+}}} | {{{4|-}}}<!-- If No_link param is defined (even if empty) Then: no wikilink version -->|{{{2|}}}{{Last word | {{Title without disambig | {{{1}}} }} }}{{{3|}}}<!-- Else: wikilink version -->|[[{{{1}}}|{{{2|}}}{{Last word | {{Title without disambig | {{{1}}} }} }}{{{3|}}}]]<!-- -->}}
|{{{1}}}|[[{{{1}}}|{{{1}}}]]}}
-->
Template data
[edit]TemplateData for Ham105/sandbox/p5
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Full_name | 1 | 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. | String | required |
Name_prefix | 2 | Text (e.g. initials, etc) to be prepended to the last name. | String | optional |
Name_suffix | 3 | Text (e.g. initials, etc) to be appended to the last name. | String | optional |
No_link | 4 | 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.
| Unknown | optional |
No_separator | 5 | 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).
| Unknown | optional |
Sandbox/p10
[edit]4 params: prefix and suffix options, with no additional space separator
{{#ifeq: {{{4|+}}} | {{{4|-}}}<!-- If No_link param is defined (even if empty) Then: no wikilink version -->|{{{2|}}}{{Last word | {{Title without disambig | {{{1}}} }} }}{{{3|}}}<!-- Else: wikilink version -->|[[{{{1}}}|{{{2|}}} {{Last word | {{Title without disambig | {{{1}}} }} }}{{{3|}}}]]<!-- -->}}
Template data
[edit]TemplateData for Ham105/sandbox/p5
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Full_name | 1 | 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. | String | required |
Name_prefix | 2 | Text (e.g. initials, etc) to be prepended to the last name. | String | optional |
Name_suffix | 3 | Text (e.g. initials, etc) to be appended to the last name. | String | optional |
No_link | 4 | 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.
| Unknown | optional |
Nigel |
Ah Wong
Ah Wong
Nigel Ah Wong|Ah Wong