Help:Cargo

From Saintapedia
Revision as of 21:54, 29 August 2024 by Tom (talk | contribs) (Undo revision 957 by Tom (talk))
Jump to navigation Jump to search

The Cargo MediaWiki extension is designed to enhance MediaWiki's capabilities by providing a structured way to store and query data within wiki templates, particularly useful for managing data in infoboxes or similar structured data representations.

Cargo stands out as a powerful tool for those looking to leverage MediaWiki not just for content but for structured data management, offering a balance between complexity and usability for wiki administrators and developers. Its integration with MediaWiki's templating system makes it particularly useful for creating dynamic, data-driven content within wiki environments.

Functionality

  • Data Storage: Cargo allows data to be stored in database tables, which can be either within MediaWiki's database or in a separate database for performance or security reasons. This data is typically derived from template calls, where each template invocation can define a row in a table.
  • Querying Data: Users can query this data using SQL-like syntax through special pages or parser functions provided by Cargo, like #cargo_query. This allows for dynamic content generation based on the data stored.
  • Parser Functions:
  1. cargo_declare: Defines the schema for a table, placed within the part of a template.
  2. cargo_attach: Specifies that a template adds rows to a table declared elsewhere.
  3. cargo_store: Stores data into a Cargo table, usually within the