Difference between revisions of "Template:FMD designer/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jonesey95
(Fix Linter errors)
imported>Zyxw
(updates for use of Wikidata and tracking of missing ID)
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 -->
<div style="font-size: 110%;">{{Template redirect|Fashiondesigner}}</div>
+
{{Template redirect|Fashiondesigner}}
{{Wikidata property|P2412|P2266|P2413|P2485|P2486}}
+
{{Lua|Module:EditAtWikidata}}
 +
{{Uses Wikidata|P2412}}
  
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a designer's profile at the [[Fashion Model Directory]] (FMD) website.
+
This template displays an external link to a designer'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 ==
No parameters (uses the Wikipedia article title as the ID string for [[URL]] and as the [[link text]]):
+
Unnamed parameters:
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}}}</code>
+
: {{tlcw|FMD designer | <var>ID</var> }}
 +
: {{tlcw|FMD designer | <var>ID</var> | <var>NAME</var> }}
  
One parameter (uses the Wikipedia article title as the link text):
+
Named parameters:
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
+
: {{tlcw|FMD designer | id{{=}} <var>ID</var> }}
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
+
: {{tlcw|FMD designer | id{{=}} <var>ID</var> | name{{=}} <var>NAME</var> }}
  
Two parameters (uses the specified name as the link text):
+
Using [[Wikidata]] property {{Property|P2412}}:
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
+
: {{tlcw|FMD designer}}
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
+
: {{tlcw|FMD designer | name{{=}} <var>NAME</var> }}
  
 
== Examples ==
 
== Examples ==
  
=== No parameters ===
+
=== Unnamed parameters ===
The following example shows a link using the Wikipedia article title in the URL:
+
''URL:''
: <code><nowiki>http://</nowiki>www.fashionmodeldirectory.com/designers/{{hilite|page-name}}/</code>
+
: <kbd>[https://www.fashionmodeldirectory.com/designers/giorgio-armani/ https://www.fashionmodeldirectory.com/designers/{{Hilite|giorgio-armani}}/]</kbd>
  
Usage:
+
''Usage:''
: <code>{{((}}{{BASEPAGENAME}}{{))}}</code>
+
: {{tlcw|a=1|FMD designer | giorgio-armani | Giorgio Armani }}
Results:
 
: {{ {{BASEPAGENAME}} }}
 
  
=== One parameter ===
+
''Output:''
The following example shows a link to the page for [[Giorgio Armani]]:
+
:* {{FMD designer | giorgio-armani | Giorgio Armani }}
: <code><nowiki>http://</nowiki>www.fashionmodeldirectory.com/designers/{{hilite|giorgio-armani}}/</code>
 
  
Usage:
+
=== Named parameters ===
: <code>{{((}}{{BASEPAGENAME}} {{!}} giorgio-armani {{))}}</code>
+
''URL:''
: <code>{{((}}{{BASEPAGENAME}} {{!}} id= giorgio-armani {{))}}</code>
+
: <kbd>[https://www.fashionmodeldirectory.com/designers/richie-rich-and-traver-rains/ https://www.fashionmodeldirectory.com/designers/{{Hilite|richie-rich-and-traver-rains}}/]</kbd>
Results:
 
: {{{{BASEPAGENAME}} | giorgio-armani }}
 
: {{{{BASEPAGENAME}} | id= giorgio-armani }}
 
  
=== Two parameters ===
+
''Usage:''
The following example shows a link to the page for [[Richie Rich (designer)|Richie Rich]] and [[Traver Rains]]:
+
: {{tlcw|a=1|FMD designer | id{{=}} richie-rich-and-traver-rains | name{{=}} Richie Rich and Traver Rains }}
: <code><nowiki>http://</nowiki>www.fashionmodeldirectory.com/designers/{{hilite|richie-rich-and-traver-rains}}/</code>
 
  
Usage:
+
''Output:''
: <code>{{((}}{{BASEPAGENAME}} {{!}} richie-rich-and-traver-rains {{!}} Richie Rich and Traver Rains {{))}}</code>
+
:* {{FMD designer | id= richie-rich-and-traver-rains | name= Richie Rich and Traver Rains }}
: <code>{{((}}{{BASEPAGENAME}} {{!}} id= richie-rich-and-traver-rains {{!}} name= Richie Rich and Traver Rains {{))}}</code>
 
Results:
 
: {{{{BASEPAGENAME}} | richie-rich-and-traver-rains | Richie Rich and Traver Rains }}
 
: {{{{BASEPAGENAME}} | id= richie-rich-and-traver-rains | name= Richie Rich and Traver Rains }}
 
  
== Template data ==
+
=== No parameters and Wikidata property not defined ===
{{TemplateDataHeader}}
+
''Usage:''
 +
: {{tlcw|a=1|FMD designer}}
 +
 
 +
''Output:''
 +
:* {{FMD designer}}
 +
 
 +
== TemplateData ==
 +
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
        "description": "This template displays an external link to a designer's profile at the Fashion Model Directory (FMD) website.",
+
"description": "This template displays an external link to a designer's profile at the FMD website. It is intended for use in the external links section of an article.",
 
"params": {
 
"params": {
"1": {
+
"id": {
"label": "ID",
+
"label": "id",
"aliases": [ "id" ],
+
"aliases": ["1"],  
"description": "ID string used in the URL. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation and urlencoded.",
+
"description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: giorgio-armani is the ID portion of https://www.fashionmodeldirectory.com/designers/giorgio-armani/. This parameter is optional if Wikidata property P2412 exists, but required if not.",
 
"type": "string",
 
"type": "string",
"required": false
+
"required": false,
 +
"default": "Wikidata property P2412"
 
},
 
},
"2": {
+
"name": {
"label": "Name",
+
"label": "name",
"aliases": [ "name" ],
+
"aliases": ["2"],  
"description": "Name displayed in the link text. If not specified it defaults to the article's {{PAGENAME}}, 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 designer. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(designer)\".",
 
"type": "string",
 
"type": "string",
                        "required": false
+
"required": false,
 +
"default": "{{PAGENAMEBASE}}"
 
}
 
}
}
+
},
 +
"paramOrder": [
 +
"id",
 +
"name"
 +
]
 
}
 
}
 
</templatedata>
 
</templatedata>
 +
 +
== Tracking category ==
 +
* {{clc|FMD designer template missing ID and not in Wikidata}}
  
 
== See also ==
 
== See also ==
* {{tl|FMD model}} &ndash; links to a model's profile
+
* {{tl|FMD model}} for link to a model's profile at the FMD website
 
* {{tl|IMDb name}}
 
* {{tl|IMDb name}}
 
* {{tl|Official website}}
 
* {{tl|Official website}}
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
+
<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:Templates that add a tracking category]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 14:28, 24 March 2019

Template:Template redirect

Template:Uses Wikidata

This template displays an external link to a designer'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/designers/giorgio-armani/

Usage:

Template:Tlcw

Output:

Named parameters

URL:

https://www.fashionmodeldirectory.com/designers/richie-rich-and-traver-rains/

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 FMD designer

This template displays an external link to a designer'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: giorgio-armani is the ID portion of https://www.fashionmodeldirectory.com/designers/giorgio-armani/. This parameter is optional if Wikidata property P2412 exists, but required if not.

Default
Wikidata property P2412
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 designer. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(designer)".

Default
{{PAGENAMEBASE}}
Stringoptional

Tracking category

See also