Template:CrewCredit/doc
This template should only ever be substituted. Transclusion will not work. See the section on usage for more information.
{{CrewCredit}} is a template used to build "crew templates". The main example of these types of templates is {{Wales Crew}}, although this example does not use this template yet. More examples that do use this template will be added soon, once they exist.
Usage
This template is an abstraction of Module:Crew. It should only be substituted on template pages. The end result of substituting is that you will end up with a line of slightly more complex code that accepts an argument or a number of arguments for a specific credit and then displays that credit. The syntax is simple:
{{subst:CrewCredit|display name of credit|name of variable (optional)}}
The display name of credit variable is used as the display name of the particular credit. The name of variable parameter is the name of the variable that the person using the crew template will use. If it is not specified, it will default to the display name.
Examples
If you wanted to create a credit for Director, you would type the following on the crew template's page:
{{subst:CrewCredit|director}}
Upon saving, this would be expanded into:
{{#invoke:Crew|generateCredit|credit=director|varname=}}
Then, when using the crew template, an editor would specify the director in the following way:
|director=Christopher Barry
This would produce the following output on the story page that the credit is for:
Director - Christopher Barry
Here's another example demonstrating how you can specify the variable name, as well as how the template accommodates having multiple people with the same credit, using assistant director. On the crew template's page, you would type:
{{subst:CrewCredit|assistant director|AD}}
Upon saving, this would be expanded into:
{{#invoke:Crew|generateCredit|credit=assistant director|varname=AD}}
Then, when using the crew template, an editor would specify the assistant directors in the following way (theoretically, infinite assistant directors could be credited in the following format):
|AD=Gareth Jones (assistant director) |AD2=Louisa Cavell
This would produce the following output on the story page that the credit is for:
Assistant Directors - Gareth Jones, Louisa Cavell