Difference between revisions of "Template:EPCR profile"

From blackwiki
Jump to navigation Jump to search
imported>Gabinho
(updated)
imported>Zyxw
(Add fix for empty parameters. Trim any leading or trailing spaces in parameters. Update usage and add examples. Add category.)
Line 1: Line 1:
−
[https://www.epcrugby.com/player?PlayGuid={{{1|{{{id}}}}}} {{{2|{{{name|{{PAGENAMEBASE}}}}}}}}] profile at [[European Rugby Champions Cup]] website<noinclude>
+
[https://www.epcrugby.com/player?PlayGuid={{Trim|{{{1|{{{id<includeonly>|</includeonly>}}}}}}}} {{#if: {{{2|{{{name<includeonly>|</includeonly>}}}}}} | {{{2|{{{name}}}}}} | {{PAGENAMEBASE}} }}] at [[European Professional Club Rugby]]<noinclude>
−
==Usage==
 
−
<nowiki>{{Epcrugby profile|id=0000|name=yyy}}</nowiki> where 0000 is the id in the URL of the site. (eg. NN862292 for European Rugby Champions Cup profile for [https://www.epcrugby.com/player?PlayGuid=NN862292 Nicolae Nere]). "name=" parameter is optional and defaults to the page name.
 
  
 +
== Usage ==
 +
; Unnamed parameters
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 +
 +
; Named parameters
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 +
 +
== Examples ==
 +
; URL
 +
: <kbd>[https://www.epcrugby.com/player?PlayGuid=NN862292 https://www.epcrugby.com/player?PlayGuid={{hilite|NN862292}}]</kbd>
 +
 +
; Usage
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | NN862292 | Nicolae Nere }}</code>
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} |id= NN862292 |name= Nicolae Nere }}</code>
 +
 +
; Output
 +
:* {{{{BASEPAGENAME}} | NN862292 | Nicolae Nere }}
 +
:* {{{{BASEPAGENAME}} |id= NN862292 |name= Nicolae Nere }}
 +
 +
[[Category:Rugby union external link templates]]
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
 
</noinclude>
 
</noinclude>

Revision as of 12:34, 12 October 2018

{{{name}}} at European Professional Club Rugby

Usage

Unnamed parameters
{{EPCR profile | ID }}
{{EPCR profile | ID | NAME }}
Named parameters
{{EPCR profile | id= ID }}
{{EPCR profile | id= ID | name= NAME }}

Examples

URL
https://www.epcrugby.com/player?PlayGuid=NN862292
Usage
* {{EPCR profile | NN862292 | Nicolae Nere }}
* {{EPCR profile |id= NN862292 |name= Nicolae Nere }}
Output