Difference between revisions of "Template:AFI film/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>GreenC
(Created page with '{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE YOU CAN EDIT THE TEMPLATE DOCUMENTATION BELOW THIS COMMEN...')
 
blackwiki>Zyxw
(update documentation, add TemplateData)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!--  
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
    PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE
 
    YOU CAN EDIT THE TEMPLATE DOCUMENTATION BELOW THIS COMMENT
 
-->
 
This is a template used to generate external links to [[The American Film Institute Catalog of Motion Pictures]]. This template should be used exclusively for ''films'' and ''television series''; to link to a person (actor, director, ''etc.'') use {{tl|AFI person}} instead.
 
  
===Usage===
+
This template is used to generate an external link to a web page at the ''[[AFI Catalog of Feature Films]]'', published by the [[American Film Institute]].
<blockquote><code><nowiki>{{AFI film|64729|Quantum of Solace}}</nowiki></code></blockquote>
 
  
=== Instructions ===
+
== Usage ==
# [http://www.afi.com/members/catalog/search.aspx?s= Search AFI Catalog] for the film title you want, and click on the correct link to go to that film's page.
+
Unnamed parameters:
# The page [[URL]] should look like this: <blockquote><code><nowiki>http://www.afi.com/members/catalog/DetailView.aspx?s=&Movie=</nowiki><font style="background-color: #FFFF88">#####</font></code></blockquote> where "######" indicates a number.
+
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
# Copy ONLY that number. Add the following text to the '''External links''' section: <blockquote><code><nowiki>{{AFI film|#####|Title}}</nowiki></code></blockquote> where <blockquote><code>#####</code> is the number you've copied, and <br><code>Title</code> is the title of the film (default is the article's name.)</blockquote>
+
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''TITLE'' }}</code>
  
=== Example ===
+
Named parameters:
# For ''[[Quantum of Solace]]'', the AFI Catalog URL is:
+
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
#* <code>http://www.afi.com/members/catalog/DetailView.aspx?s=&Movie=64729</code>
+
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | title= ''TITLE'' }}</code>
# Copy "64729" and add it to this template, ''i.e.'':
+
 
#* <code><nowiki>{{AFI film|64729|Quantum of Solace}}</nowiki></code>
+
== Instructions ==
 +
# Search [http://www.afi.com/members/catalog/search.aspx?s= AFI Catalog] for the film title you want, and click on the correct link to go to that film's page.
 +
# The page [[URL]] should look like this:
 +
#: <code><nowiki>http://www.afi.com/members/catalog/DetailView.aspx?s=&Movie=</nowiki>{{Hilite|#####}}</code>
 +
#: where "<code>#####</code>" indicates a number.
 +
# Copy {{em|only}} that number. Add the following text to the '''External links''' section:
 +
#: <code><nowiki>* {{</nowiki>AFI film | ##### | ''TITLE'' }}</code>
 +
#: or <code><nowiki>* {{</nowiki>AFI film | id= ##### | title= ''TITLE'' }}</code>
 +
#: where <code>#####</code> is the number you've copied,
 +
#: and <code>''TITLE''</code> is the title of the film (default is the article's name).
 +
 
 +
== Example ==
 +
; Film
 +
# For ''[[Quantum of Solace]]'', the AFI Catalog page URL is:
 +
#: <code><nowiki>http://www.afi.com/members/catalog/DetailView.aspx?s=&Movie=</nowiki>{{Hilite|64729}}</code>
 +
# Copy <code>64729</code> and add it to this template, ''i.e.'':
 +
#: <code><nowiki>{{AFI film | 64729 | Quantum of Solace }}</nowiki></code>
 +
#: or <code><nowiki>{{AFI film | id= 64729 | title= Quantum of Solace }}</nowiki></code>
 
# This will display as:
 
# This will display as:
#* {{AFI film|64729|Quantum of Solace}}
+
#: {{AFI film | 64729 | Quantum of Solace }}
  
<includeonly>
+
== See also ==
 +
Similar film title templates:
 +
* {{tl|IMDb title}}
 +
* {{tl|AllMovie title}}
 +
* {{tl|TCMdb title}}
  
<!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. -->
+
==Template data==
 +
{{TemplateDataHeader}}
 +
<templatedata>
 +
{
 +
        "description": "This template is used to generate an external link to a web page at the AFI Catalog of Feature Films, published by the American Film Institute.",
 +
        "params": {
 +
                "id": {
 +
                        "label": "ID",
 +
                        "description": "ID number used in the URL of the title's page at the AFI Catalog.",
 +
                        "type": "number",
 +
                        "required": true,
 +
                        "aliases" : [ "1" ]
 +
                },
 +
                "title": {
 +
                        "label": "Title",
 +
                        "description": "Name of the title. If not specified it defaults to article's {{PAGENAME}}, without any disambiguation such as (film).",
 +
                        "type": "string",
 +
                        "required": false,
 +
                        "aliases" : [ "2" ]
 +
                }
 +
        }
 +
}
 +
</templatedata>
  
 +
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 +
<!-- Categories go here and interwikis go in Wikidata. -->
 
[[Category:Film external link templates]]
 
[[Category:Film external link templates]]
 +
}}</includeonly>

Revision as of 08:30, 13 September 2014

This template is used to generate an external link to a web page at the AFI Catalog of Feature Films, published by the American Film Institute.

Usage

Unnamed parameters:

  • {{AFI film | ID }}
  • {{AFI film | ID | TITLE }}

Named parameters:

  • {{AFI film | id= ID }}
  • {{AFI film | id= ID | title= TITLE }}

Instructions

  1. Search AFI Catalog for the film title you want, and click on the correct link to go to that film's page.
  2. The page URL should look like this:
    http://www.afi.com/members/catalog/DetailView.aspx?s=&Movie=#####
    where "#####" indicates a number.
  3. Copy only that number. Add the following text to the External links section:
    * {{AFI film | ##### | TITLE }}
    or * {{AFI film | id= ##### | title= TITLE }}
    where ##### is the number you've copied,
    and TITLE is the title of the film (default is the article's name).

Example

Film
  1. For Quantum of Solace, the AFI Catalog page URL is:
    http://www.afi.com/members/catalog/DetailView.aspx?s=&Movie=64729
  2. Copy 64729 and add it to this template, i.e.:
    {{AFI film | 64729 | Quantum of Solace }}
    or {{AFI film | id= 64729 | title= Quantum of Solace }}
  3. This will display as:
    Quantum of Solace at the American Film Institute CatalogScript error: No such module "EditAtWikidata".

See also

Similar film title templates:

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 AFI film

This template is used to generate an external link to a web page at the AFI Catalog of Feature Films, published by the American Film Institute.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

ID number used in the URL of the title's page at the AFI Catalog.

Numberrequired
Titletitle 2

Name of the title. If not specified it defaults to article's {{PAGENAME}}, without any disambiguation such as (film).

Stringoptional