Template:CrewCredit

From Tardis Wiki, the free Doctor Who reference
Instructions for {{CrewCredit}}
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. Currently, the only template using this one is {{BTS crew}}. More examples that do use this template will be added soon, once they exist.

Usage[[edit source]]

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 <includeonly> and </includeonly> tags should be removed or commented out. Otherwise, the substitution will not work. The <includeonly> and </includeonly> tags can be re-added or uncommented again after you have saved the edit where you substituted this template.

The basic syntax is simple:

{{subst:CrewCredit|name of credit's wiki article|name of variable (optional)|d=credit display text (optional)|s=SMW property|p=set this if the credit should NOT be pluralised automatically|l=fully custom label (optional)|pl=fully custom pluralised label (optional)}}

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 in pascal case (PascalCase). 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. Setting the p parameter to any value will cause the template to not add an "s" to the end of the credit automatically when it should be pluralised. For example, the credit "graphics" works for both the singular and plural. Automatically adding an "s" would lead to "graphicss" which is not desirable. Therefore, this credit would have p set. The label and pluralised label parameters allow a fully customised label to be specified, allowing for more customisations than just a link display text. This is useful when 2 positions are credited simultaneously as it allows for linking to both. The pluralised label can also be used for more complex pluralisations, such as "Executive Producers for Doctor Who".

Examples[[edit source]]

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:

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:

SMW[[edit source]]

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:

{{subst:CrewCredit|assistant director|AD|s=runner}}

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.

For situations when 2 positions are credited together, |smw2= can be used for the second property.