Template:CrewCredit/doc

'''This template should only ever be substituted. Transclusion will not work. See the section on usage for more information.'''

 is a template used to build "crew templates". The main example of these types of templates is, 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.

Before making the edit to substitute this template, the and tags should be removed or commented out. Otherwise, the substitution will not work. The and tags can be re-added or uncommented again after you have saved the edit where you substituted this template.

The basic syntax is simple:

name of credit's wiki article

The name of credit's wiki article parameter is used as the link for 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. The credit display text variable is used as the display text for the credit. It defaults to a titled-cased, pluralised where necessary, name of credit's wiki article. For information on the SMW property parameter, see the dedicated section.

Examples
If you wanted to create a credit for Director, you would type the following on the crew template's page: director Upon saving, this would be expanded into: * 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: assistant director Upon saving, this would be expanded into: * 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) This would produce the following output on the story page that the credit is for:
 * AD2=Louisa Cavell
 * Assistant Directors - Gareth Jones, Louisa Cavell

SMW
One of the major benefits of these crew templates is the ability to have the information in them saved via SMW. As a quick overview if you're not yet familiar, SMW is a tool that lets you save information on one page and then query that information on another. This information is connected to a property. An example would be Property:Writer which is used to store information about who has written various stories.

To use SMW with a credit, add the s or the smw variable when substituting the template (using the s variable is quicker but the smw is clearer. Both work exactly the same, though). Here's an example:

assistant director The Runner property is used as assistant director is just an alternative job name to runner. They mean the same but the property just happens to be titled runner.

The syntax when utilising the crew template is exactly the same.