Difference between revisions of "Template:Fashionmodel/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jonesey95
(fix linter errors (misc tidy formatting error, div inside of span))
imported>Zyxw
(update examples, TemplateData, and categories)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
+
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
{{Template redirect|FMD model}}
 
{{Template redirect|FMD model}}
 
{{Lua|Module:EditAtWikidata}}
 
{{Lua|Module:EditAtWikidata}}
 
{{Uses Wikidata|P2266}}
 
{{Uses Wikidata|P2266}}
{{Wikidata property|P2412|P2413|P2485|P2486}}
 
  
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a model's profile at the [[Fashion Model Directory]] (FMD) website.
+
This template displays an external link to a model's profile at the [[Fashion Model Directory|FMD]] website. It is intended for use in the [[Wikipedia:External links|external links]] section of an article.
  
 
== Usage ==
 
== Usage ==
; Without parameters (uses ID from Wikidata and title from article)
+
Unnamed parameters:
: {{tlc|{{BASEPAGENAME}}}}
+
: {{tlcw|FMD model | <var>ID</var> }}
 +
: {{tlcw|FMD model | <var>ID</var> | <var>NAME</var> }}
  
; One parameter (uses the Wikipedia article title as the link text):
+
Named parameters:
: {{tlc|{{BASEPAGENAME}}|<var>ID</var> }}
+
: {{tlcw|FMD model | id{{=}} <var>ID</var> }}
: {{tlc|{{BASEPAGENAME}}|2=id=<var>ID</var>}}
+
: {{tlcw|FMD model | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }}
  
; Two parameters (uses the specified name as the link text):
+
Using [[Wikidata]] property {{Property|P2266}}:
: {{tlc|{{BASEPAGENAME}}|<var>ID</var>|<var>NAME</var>}}
+
: {{tlcw|FMD model}}
: {{tlc|{{BASEPAGENAME}}|2=id=<var>ID</var>|3=name=<var>NAME</var>}}
+
: {{tlcw|FMD model | name{{=}} <var>NAME</var> }}
  
 
== Examples ==
 
== Examples ==
  
=== One parameter ===
+
=== Unnamed parameters ===
The following example shows a link to the FMD model profile for [[Emily Ratajkowski]]:
+
''URL:''
: <code><nowiki>http://</nowiki>www.fashionmodeldirectory.com/models/{{hilite|emily_ratajkowski}}/</code>
+
: <kbd>[https://www.fashionmodeldirectory.com/models/emily_ratajkowski/ https://www.fashionmodeldirectory.com/models/{{Hilite|emily_ratajkowski}}/]</kbd>
  
Usage:
+
''Usage:''
: {{tlc|{{BASEPAGENAME}}|emily_ratajkowski}}
+
: {{tlcw|a=1|FMD model | emily_ratajkowski | Emily Ratajkowski }}
: {{tlc|{{BASEPAGENAME}}|2=id=emily_ratajkowski}}
+
 
Results:
+
''Output:''
: {{{{BASEPAGENAME}}|emily_ratajkowski}}
+
:* {{FMD model | emily_ratajkowski | Emily Ratajkowski }}
: {{{{BASEPAGENAME}}|id=emily_ratajkowski}}
 
  
=== Two parameters ===
+
=== Named parameters ===
The following example shows a link to the FMD model profile for [[Georgia May Jagger]]:
+
''URL:''
: <code><nowiki>http://</nowiki>www.fashionmodeldirectory.com/models/{{hilite|Georgia+May_Jagger}}/</code>
+
: <kbd>[https://www.fashionmodeldirectory.com/models/Georgia+May_Jagger/ https://www.fashionmodeldirectory.com/models/{{Hilite|Georgia+May_Jagger}}/]</kbd>
  
Usage:
+
''Usage:''
: {{tlc|{{BASEPAGENAME}}|Georgia+May_Jagger|Georgia May Jagger}}
+
: {{tlcw|a=1|FMD model | id{{=}} Georgia+May_Jagger | name{{=}} Georgia May Jagger }}
: {{tlc|{{BASEPAGENAME}}|2=id=Georgia+May_Jagger|3=name=Georgia May Jagger}}
+
 
Results:
+
''Output:''
: {{{{BASEPAGENAME}}|Georgia+May_Jagger|Georgia May Jagger}}
+
:* {{FMD model | id= Georgia+May_Jagger | name= Georgia May Jagger }}
: {{{{BASEPAGENAME}}|id=Georgia+May_Jagger|name=Georgia May Jagger}}
 
  
 
=== No parameters and Wikidata property not defined ===
 
=== No parameters and Wikidata property not defined ===
 
''Usage:''
 
''Usage:''
: {{tlc|{{BASEPAGENAME}}}}
+
: {{tlcw|a=1|FMD model}}
 +
 
 
''Output:''
 
''Output:''
: {{ {{BASEPAGENAME}} }}
+
:* {{FMD model}}
  
== Template data ==
+
== TemplateData ==
 
{{TemplateData header}}
 
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
        "description": "This template displays an external link to a model's profile at the Fashion Model Directory (FMD) website.",
+
"description": "This template displays an external link to a model's profile at the FMD website. It is intended for use in the external links section of an article.",
"format": "inline",
 
 
"params": {
 
"params": {
 
"id": {
 
"id": {
"label": "ID",
+
"label": "id",
"aliases": [ "1" ],
+
"aliases": ["1"],  
"description": "ID string used in the URL.",
+
"description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: emily_ratajkowski is the ID portion of https://www.fashionmodeldirectory.com/models/emily_ratajkowski/. This parameter is optional if Wikidata property P2266 exists, but required if not.",
 
"type": "string",
 
"type": "string",
"required": false
+
"required": false,
 +
"default": "Wikidata property P2266"
 
},
 
},
 
"name": {
 
"name": {
"label": "Name",
+
"label": "name",
"aliases": [ "2" ],
+
"aliases": ["2"],  
"description": "Name displayed in the link text. If not specified it defaults to the article's title without disambiguation.",
+
"description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the model. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(model)\".",
 
"type": "string",
 
"type": "string",
                        "required": false
+
"required": false,
 +
"default": "{{PAGENAMEBASE}}"
 
}
 
}
}
+
},
 +
"paramOrder": [
 +
"id",
 +
"name"
 +
]
 
}
 
}
 
</templatedata>
 
</templatedata>
  
==Tracking categories==
+
==Tracking category==
* {{clc|Fashionmodel template with no ID set}}
+
* {{clc|FMD model template missing ID and not in Wikidata}}
  
 
== See also ==
 
== See also ==
* {{tl|FMD designer}} &ndash; link to a designer's profile at the FMD website
+
* {{tl|FMD designer}} for link to a designer's profile at the FMD website
 
* {{tl|IMDb name}}
 
* {{tl|IMDb name}}
 
* {{tl|Official website}}
 
* {{tl|Official website}}
  
<includeonly>{{sandbox other||
+
<includeonly>{{Sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Fashion templates]]
 
[[Category:Fashion templates]]
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
 
[[Category:External link templates using Wikidata]]
 
[[Category:External link templates using Wikidata]]
 +
[[Category:Templates that add a tracking category]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 14:32, 24 March 2019

Template:Template redirect

Template:Uses Wikidata

This template displays an external link to a model's profile at the FMD website. It is intended for use in the external links section of an article.

Usage

Unnamed parameters:

Template:Tlcw
Template:Tlcw

Named parameters:

Template:Tlcw
Template:Tlcw

Using Wikidata property Template:Property:

Template:Tlcw
Template:Tlcw

Examples

Unnamed parameters

URL:

https://www.fashionmodeldirectory.com/models/emily_ratajkowski/

Usage:

Template:Tlcw

Output:

Named parameters

URL:

https://www.fashionmodeldirectory.com/models/Georgia+May_Jagger/

Usage:

Template:Tlcw

Output:

No parameters and Wikidata property not defined

Usage:

Template:Tlcw

Output:

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Fashionmodel

This template displays an external link to a model's profile at the FMD website. It is intended for use in the external links section of an article.

Template parameters

ParameterDescriptionTypeStatus
idid 1

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: emily_ratajkowski is the ID portion of https://www.fashionmodeldirectory.com/models/emily_ratajkowski/. This parameter is optional if Wikidata property P2266 exists, but required if not.

Default
Wikidata property P2266
Stringoptional
namename 2

The "name" parameter (or unnamed parameter "2") may be used to specify the link text, which should be the name of the model. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(model)".

Default
{{PAGENAMEBASE}}
Stringoptional

Tracking category

See also