Bureaucrats, Moderators (CommentStreams), Interface administrators, Push subscription managers, Suppressors, Administrators
11,987
edits
(Created page with "= Understanding MediaWiki Cargo Templates = Cargo is a MediaWiki extension that lets you store structured data from wiki pages in database-like tables. This makes it easy to query and display data across your wiki. Templates are a key way to use Cargo, allowing editors to input data (like filling out a form) that gets saved and reused. A '''Cargo-enabled template''' has three main parts that work together to define, display, and store data: # '''The declaration part'''...") |
|||
| Line 17: | Line 17: | ||
=== How It Works === | === How It Works === | ||
You use the parser function < | You use the parser function <pre>{{#cargo_declare:}}</pre> with parameters: | ||
* The first parameter is always <code>_table=TableName</code> (replace <code>TableName</code> with something descriptive, like <code>Books</code>). | * The first parameter is always <code>_table=TableName</code> (replace <code>TableName</code> with something descriptive, like <code>Books</code>). | ||
* Then, list each field as <code>|FieldName=Type (options)</code>. Common types include: | * Then, list each field as <code>|FieldName=Type (options)</code>. Common types include: | ||