Help:Class: Difference between revisions

1,369 bytes added ,  1 November 2024
→‎Table: expand
(→‎Table: expand)
Line 108: Line 108:
===Output format===
===Output format===
The options are:
The options are:
Each of these formats can be customized further by using parameters like template, named args, or separator to control how data is displayed or separated within the result. Remember that the exact syntax and capabilities might depend on the version of Cargo you are using, so always check the latest documentation for the most current options and features.


==== Table ====
==== Table ====
* The table is the default output format for Cargo queries.
* Results are displayed in a tabular format with each row representing a record and columns for each field of the record.
Example:
<nowiki>{{#cargo_query:
|tables=ExampleTable
|fields=Field1, Field2
}}
</nowiki>


* This is the default output format for Cargo queries.
==== Side Infobox ====
* Results are displayed in a tabular format with each row representing a record and columns for each field of the record.
* Side [[infobox]] is designed for displaying information in a box typically positioned to the side of an article.
* This format creates a box that can be floated to the right or left of content, useful for displaying metadata or summary information about a subject.
 
Example:
<nowiki>{{#cargo_query:
|tables=ExampleTable
|fields=Field1, Field2
|format=infobox
}}</nowiki>
 
==== Plain Text ====
* Use this when you need the output in plain text, without any HTML formatting.
* This format removes all HTML tags and presents data in a straightforward text manner, which can be useful for embedding data in text or for custom formatting.
 
==== Sections ====
* Sections are useful when you want to organize information into sections within a page.
* Each record is displayed as a section, often with a header. This format is handy for creating detailed pages where each section represents different aspects or entries of a subject.


Example{{#cargo_query: |tables=ExampleTable |fields=Field1, Field2 }}
Example:
*
<nowiki>{{#cargo_query:
*Side [[infobox]]  - This...
|tables=ExampleTable
*Plain text - This...
|fields=Field1, Field2
*Sections - This...
|format=sections
}}</nowiki>


===Options===
===Options===
CargoAdmin, Bureaucrats, Moderators (CommentStreams), fileuploaders, newuser
401

edits