Support wiki
This is the wiki.gg support wiki! It's a different site from your content wiki!
Cargo/Display formats
The "format=" parameter lets you set in which format to display the results.
If no format is specified, list
is the default format if there is only a single field being displayed in the results, while table
is the default format if there is more than one field.
The Cargo extension supports the following formats:
Lists
list
Displays results in a delimited list.
Parameters:
delimiter
- sets the separator character (default is comma). Use\n
to place each item on its own line, for example|fields= CONCAT("* ", nameOfField)=nameOfField |delimiter=\n
ul
Displays results in a bulleted list.
Parameters:
columns
- sets the number of columns (default is 1 but can be changed with CSS)
ol
Displays results in a numbered list.
Parameters:
columns
- sets the number of columns (default is 1)
category
Displays results in the style of MediaWiki categories.
Parameters:
columns
- sets the number of columns (default is 3)
More complex text displays
template
Displays results using a MediaWiki template that formats each row of results. By default, the template in question should use unnamed parameters, i.e. it should refer to its parameters as {{{1|}}}, {{{2|}}} etc.
Parameters:
template
- specifies the name of the template to use (mandatory)named args
- if set to "yes", specifies that the template should instead have named parameters, where the parameter names are the names (or aliases, if they are set) of the query fieldsdelimiter
- sets the separator string (default is no separator). "\n" placed within this value will get translated into a newline.
embedded
Shows the full text of each queried page (only the first field of the query is used). (No parameters.)
outline
Shows results in an outline format.
Parameters:
outline fields
- holds a comma-separated list of the query's fields (without the table name part); these fields are used to define the outline, by which the results are grouped together (mandatory)
Example: chileru.org Статьи
tree
Shows results in a tree format, in which a single field defines all the relationships between "child" pages and "parent" pages.
Parameters:
parent field
- holds the name of this connector field (mandatory)
table
Displays results in a table.
Parameters:
merge similar cells
- if set to "yes", causes adjacent cells in the same column that hold the same value to be merged together, to make for easier reading.edit link
- if set to "yes", causes an "edit" link to show up next to every result in a column labeled_pageName
,Page
, or the localized name ofPage
.
dynamic table
Displays results in a "dynamic" table that includes sorting, pagination and searching, using the DataTables JavaScript library.
Parameters:
rows per page
- sets the number of rows that are initially shown on every "page" of the table (default is 10)searchable columns
- if set to "yes", causes fields to have a special search input above their columnsdetails fields
- specifies the fields should not have a column but rather should be included in a special "details section" under each row. (Note that each such field must be included in thefields
parameter as well. Also, details fields are not searched.)hidden fields
- specifies the fields that should not be included in the table by default but can be added in by the user via a "Toggle columns" link. (Note that each such field must be listed in thefields
parameter as well.)column widths
- holds a comma-separated list of widths for each column. Not every column width needs to be specified. Example:column widths=10px, 20px,,,14%
header tooltips
- holds a comma-separated list of additional explanations for any column, which will be displayed as tooltips after the header for any column. The format matches that ofcolumn widths
.
Image displays
gallery
Displays a gallery of images, in the style of the MediaWiki <gallery> tag. The images must be files that were uploaded to the wiki; they can either be the pages that are directly queried (if the image pages call a Cargo-based template), or fields, of type "File", of other pages.
Parameters:
mode
- sets the display mode of the gallery; can betraditional
(the default),nolines
,packed
,packed-overlay
orpacked-hover
. See here for a demonstration of these options.show bytes
- if set to "0", hides the file size of each image (it is shown by default)show dimensions
- if set to "0", hides the dimensions of each image (they are shown by default)show filename
- if set to "0", hides the name of each image (it is shown by default)per row
- specifies the number of images displayed on each rowimage width
- specifies the width, in pixels, at which to display each imageimage height
- specifies the height, in pixels, at which to display each imagecaption field
- specifies the name of a query field whose value should be used for each image captionalt field
- specifies the name of a query field whose value should be used as the "alt text" for each imagelink field
- specifies the name of a query field whose value should be used as the name of the page that the image links to
Example: Absit Omen Lexicon user page generated by this template
Time-based displays
calendar
Displays results in a calendar, using the FullCalendar JavaScript library.
For this format to work, the query must contain at least one field of type Date or Datetime, as well as the _pageName
field (with no alias), or another field with the "=name" alias.
Parameters:
width
- sets the width of the calendar (default is 100%)height
- sets the height of the calendar (default is for the height to fit the content to be displayed)start date
- sets the date at which to display the calendar (default is the current date)view
- sets the starting display of the calendar - options are 'day', 'week', or 'month' (default is month)color
- sets the color for the bubble around names of events; useful within #compound_query (default is set by the FullCalendar library)text color
- sets the color of the text of event names (default is white)
Special aliases:
- These are specific field aliases that can be set, so that that field's values become attributes of each corresponding event. For instance, having a component like "EventName=name" in the "fields" parameter in #cargo_query will let you use a field other than the page name to set the name of each event.
name
- sets the name of the eventdescription
- sets an event description, displayed when the event is hovered overlink
- sets the page that will be linked to for each eventcolor
- same behavior as the "color" parametertext color
- same behavior as the "text color" parameterstart
- used for multi-day events; sets the start dateend
- used for multi-day events; sets the end date
Example: Discourse DB opinion calendar, ICANNWiki IG Hub Calendar
Numerical displays
bar chart
Displays results in a bar chart (with horizontal bars), using the NVD3 JavaScript library.
Parameters:
height
- sets the height of the bar chart (default is based on the number of bars)width
- sets the width of the bar chart (default is 100%)
Examples: Discourse DB most popular authors, HUES technology database contents analysis (see bottom of page)
pie chart
Displays results in a pie chart, using the NVD3 JavaScript library.
Parameters:
height
- sets the height of the pie chartwidth
- sets the width of the pie chart (default is 100%)colors
- a comma-separated list of colors fort the pie chart "slices"hide legend
- if set to "yes", removes the chart legend that shows up
Example: GrandOrder Wiki Servant Heights
Maps
To display a map, one of the selected fields in a query must be of type Coordinates
.
leaflet
Displays results in a map, using the Leaflet JS library.
Parameters: same as for googlemaps
, plus one additional parameter:
image
- sets an image to be the background for the map display, instead of a standard geographical map; specified image must be an image that has been uploaded to the wiki.
Special aliases: same as for googlemaps
.
openlayers
Displays results in a map, using the OpenLayers service.
Parameters: same as for googlemaps
.
Special aliases: same as for googlemaps
.
Example: ArchivesWiki items map
map
Displays result in a map, using the default map service (It can be set by adding $wgCargoDefaultMapService
setting to LocalSettings.php. It sets the default map service to Google Maps, if set to 'googlemaps', to Leaflet if set to 'leaflet', and to OpenLayers if set to 'openlayers' (default is 'openlayers'))
Parameters: same as for googlemaps
.
Special aliases: same as for googlemaps
.
Export
Six export-based display formats are defined: bibtex
, csv
, excel
, feed
, icalendar
, and json
. See Exporting data for documentation on these. In addition, the "exhibit" format displays an orange toolbox that lets you download the current data in various export formats: BibTex, RDF/XML, JSON, Semantic Wikitext and TSV.