Template:Cargo

From Terraria Mods Wiki
Jump to navigation Jump to search
Template-info.svg Documentation The documentation below is transcluded from Template:Cargo/doc. (edit | history)

This template displays a notice about the usage of the MediaWiki Cargo extension of a template. It is to be placed in the template's source code, in front of {{doc}}.

If the template uses the {{#cargo_declare:}} and/or {{#cargo_attach:}} calls, they are to be put in the template's unnamed parameters.

Usage

{{ cargo | <cargo parser function calls> | query<n> = <cargo table name> | nocat = y/yes/1 }}

First/second unnamed parameter

{{#cargo_declare:}} and/or {{#cargo_attach:}} calls, if necessary for the template.

query1/query2/etc.

Names of cargo tables queried by the template, can be continued infinitely.

nocat

Prevents the categorization of the template in Category:Templates using Cargo, which is enabled by default.

Examples

Code Result
{{cargo|query1=Imageinfo|query2=Foobar}}
This template uses the Cargo extension.
This template uses Extension:Cargo, an integral part of the wiki's back-end.
  • This template queries the table "Imageinfo". View table.
  • This template queries the table "Foobar" (table does not exist).
{{cargo|{{#cargo_attach:_table=Imageinfo}}|query1=Foobar}}
This template uses the Cargo extension.
This template uses Extension:Cargo, an integral part of the wiki's back-end.
  • This template adds rows to the table "Imageinfo", which is declared by the template Image. View table.
  • This template queries the table "Foobar" (table does not exist).
{{cargo|{{#cargo_declare:_table=Foobar|...}}|{{#cargo_attach:_table=Imageinfo}}}}
This template uses the Cargo extension.
This template uses Extension:Cargo, an integral part of the wiki's back-end.
  • This template defines the table "Foobar". View table.
  • This template adds rows to the table "Items", which is declared by the template Image. View table.