Extension:Cargo/Browsing data

Cargo provides a number of ways to generically view stored data; these are all publicly-available, but some are intended for regular users, some for administrators, and some for both.

Drill-down interface
The main mechanism that Cargo provides for browsing data is the page Special:Drilldown, which shows a listing of each table and its contents, and a set of filters for drilling down on that information. Its interface is derived from, and almost identical to, that of the extension Semantic Drilldown. The main difference is that, unlike with Semantic Drilldown, filters do not have to be defined; instead, Cargo sets the filters automatically, based on the types of the fields for each table. Fields of type Text, Page, Integer, Float, Date and Datetime are turned into filters, with the input type used dependent on the field type; other field types, like URL, Coordinates and Wikitext, are not. (Any fields marked as "hidden" similarly will not be shown as filters.)

The following settings can be applied for Special:Drilldown, in LocalSettings.php:
 * $wgCargoDrilldownUseTabs - display set of table names as tabs at the top instead of a vertical list on the side (default is false)
 * $wgCargoDrilldownSmallestFontSize - if set to a positive number, sets the smallest font size, in pixels, for a tag-cloud-style display of filter values (default is -1)
 * $wgCargoDrilldownLargestFontSize - if set to a positive number, sets the largest font size, in pixels, for a tag-cloud-style display of filter values (default is -1)
 * $wgCargoDrilldownMinValuesForComboBox - sets the minimum number of values before values are displayed in a combo box instead of as individual links (default is 40)
 * $wgCargoDrilldownNumRangesForNumbers - for fields/filters of type "Integer" or "Float", specifies the number of "buckets" into which values are divided (default is 5)

Viewing tables
You can also simply view the contents of each table, via the page Special:CargoTables. Going to that page will show a list of all the tables in the Cargo database, with links to "view" and "drilldown" (and, for administrators, "delete") each table. The "view" links will go to the page "Special:CargoTables/tableName". Clicking on any of the "view" links will show a table displaying the full contents. (Again, with the exception of "hidden" fields.) This is the same URL that is linked to from any template that declares or attaches to a Cargo table.

Values for a single page
Cargo provides a new MediaWiki action, "action=pagevalues", that shows the set of table rows defined for any specific page. This action is accessible from the "Page values" link at the bottom of the sidebar. The "page values" display can show rows from multiple tables, if more than one type of Cargo-based template is called on a page.