Template:Cargo

来自Terraria Wiki
跳到导航 跳到搜索
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:Cargo/l10n for the localization of this template.
Template-info.svg 文档 以下文档来自Template:Cargo/doc。(编辑 | 历史

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=NPCs|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 "NPCs". 查看表格.
  • This template queries the table "Foobar" (table does not exist).
{{cargo|{{#cargo_attach:_table=Drops}}|query1=GameText}}
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 "Drops", which is declared by the template Npc infobox/drop. View table.
  • This template queries the table "GameText" (table does not exist).
{{cargo|{{#cargo_declare:_table=NPCs|...}}|{{#cargo_attach:_table=Items}}}}
This template uses the Cargo extension.
This template uses Extension:Cargo, an integral part of the wiki's back-end.