Difference between revisions of "Template:Aljazeera topic/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>777sms
blackwiki>Zyxw
(update documentation, add TemplateData)
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]]) -->
  
== Function ==
+
This template generates an external link to a topic page at the ''[[Al Jazeera English]]'' website.
Link to an Al Jazeera English topic page.
 
  
 
== Usage ==
 
== Usage ==
Provide the url path (after the first level) as the first parameter, and an optional name as the second parameter. If no name is provided for the second parameter, the template will use the name of the Wikipedia article.
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
  
<nowiki>{{Aljazeera topic|Aljazeera topic path|path}}</nowiki>
+
== Instructions ==
 +
Provide the [[URL]] path (after the first level) as the first parameter, and an optional name as the second parameter. If no name is provided for the second parameter, the template will use the name of the Wikipedia article.
  
Example:
+
== Examples ==
<br><nowiki>{{Aljazeera topic|person/hosni-mubarak|Hosni Mubarak}}</nowiki>
 
<br>Appears as:
 
<br>{{Aljazeera topic|person/hosni-mubarak|Hosni Mubarak}}
 
  
Example using default name:
+
=== One parameter ===
<br><nowiki>{{Aljazeera topic|person/hosni-mubarak}</nowiki>
+
URL:
<br>Appears as:
+
: <code><nowiki>http://</nowiki>english.aljazeera.net/category/{{hilite|person/hosni-mubarak}}</code>
<br>{{Aljazeera topic|person/hosni-mubarak}}
+
Usage:
 +
: <code>{{((}}{{BASEPAGENAME}} {{!}} person/hosni-mubarak {{))}}</code>
 +
Output:
 +
: {{{{BASEPAGENAME}} | person/hosni-mubarak }}
  
<includeonly>
+
=== Two parameters ===
 +
URL:
 +
: <code><nowiki>http://</nowiki>english.aljazeera.net/category/{{hilite|person/hosni-mubarak}}</code>
 +
Usage:
 +
: <code>{{((}}{{BASEPAGENAME}} {{!}} person/hosni-mubarak {{!}} Hosni Mubarak {{))}}</code>
 +
Output:
 +
: {{{{BASEPAGENAME}} | person/hosni-mubarak | Hosni Mubarak }}
 +
 
 +
== Template data ==
 +
{{TemplateDataHeader}}
 +
<templatedata>
 +
{
 +
        "description": "This template generates an external link to a topic page at the Al Jazeera English website.",
 +
"params": {
 +
"1": {
 +
"label": "ID",
 +
"description": "ID string used in the URL.",
 +
"type": "string",
 +
"required": true
 +
},
 +
"2": {
 +
"label": "Name",
 +
"description": "Name displayed in the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.",
 +
"type": "string",
 +
                        "required": false
 +
}
 +
}
 +
}
 +
</templatedata>
 +
 
 +
==See also==
 +
* {{tl|NYT topic}} &ndash; topic page at ''[[The New York Times]]''
 +
* {{tl|WSJ topic}} &ndash; topic page at ''[[The Wall Street Journal]]''
 +
* {{tl|Bloomberg topic}} &ndash; topic page at ''[[Bloomberg L.P.|Bloomberg News]]''
 +
* {{tl|Guardian topic}} &ndash; topic page at ''[[The Guardian]]''
 +
* {{tl|WhoRunsGov}} &ndash; topic page at ''[[The Washington Post]]''
 +
 
 +
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 +
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:External link templates]]
 
[[Category:External link templates]]
 
+
}}</includeonly>
[[ko:틀:알자지라 토픽]]
 
[[ja:Template:Aljazeeratopic]]
 
</includeonly>
 

Revision as of 15:47, 7 October 2014

This template generates an external link to a topic page at the Al Jazeera English website.

Usage

{{Aljazeera topic | ID }}
{{Aljazeera topic | ID | NAME }}

Instructions

Provide the URL path (after the first level) as the first parameter, and an optional name as the second parameter. If no name is provided for the second parameter, the template will use the name of the Wikipedia article.

Examples

One parameter

URL:

http://english.aljazeera.net/category/person/hosni-mubarak

Usage:

{{Aljazeera topic | person/hosni-mubarak }}

Output:

Template:PAGENAMEBASE collected news and commentary at Al Jazeera English

Two parameters

URL:

http://english.aljazeera.net/category/person/hosni-mubarak

Usage:

{{Aljazeera topic | person/hosni-mubarak | Hosni Mubarak }}

Output:

Hosni Mubarak collected news and commentary at Al Jazeera English

Template data

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 Aljazeera topic

This template generates an external link to a topic page at the Al Jazeera English website.

Template parameters

ParameterDescriptionTypeStatus
ID1

ID string used in the URL.

Stringrequired
Name2

Name displayed in the link text. If not specified it defaults to the article's {{PAGENAME}}, without disambiguation.

Stringoptional

See also