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. The basic syntax is simple:

display name of credit

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: 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: Assistant Directors - Gareth Jones, Louisa Cavell
 * AD2=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.