Template:TableDraw/doc: Difference between revisions

From Game Detectives Wiki
Jump to navigation Jump to search
Mattyb (talk | contribs)
No edit summary
Mattyb (talk | contribs)
No edit summary
Line 60: Line 60:
| defines the [[Property:argType|type]] of pages returned
| defines the [[Property:argType|type]] of pages returned
|
|
|<code>Official</code>, <code>Unofficial</code>, or <code>Investigation<code>
|<code>Official</code>, <code>Unofficial</code>, or <code>Investigation</code>
| String
| String
| Optional
| Optional

Revision as of 01:59, 7 June 2018

Description

This is the {{tableDraw}} or Table draw meta-template. This template is used to create datatables populated by data gathered from pages using {{argbox}}, {{autoArgbox}}, or {{argHeader}}. It can be used to display data in one of two table formats, default and small.

Syntax

Type {{tableDraw}} somewhere, with parameters as shown below.

Sample output
{{tableDraw
| pageFilter  = rootpage
| type        = Official
| nameFilter  = !~Waking Titan
}}

Results in...

{{
  1. ask: argType::OfficialargStatus::ActiveargDiscoverDate::!1970argPageType::rootpageargName::!~Waking Titan
Name Status Creator Start Date Last Edited (UTC)
?argName ?argStatus ?argCreator ?argCreator2 ?argCreator3 ?argDiscoverDate#ISO ?Modification date#-F[M d Y, g:i:s a] format=template mainlabel=- template=DefaultTable sort=argDiscoverDate order=descending limit=500

}} {{

  1. ask: argType::OfficialargStatus::CompletedargDiscoverDate::!1970argPageType::rootpageargName::!~Waking Titan
?argName ?argStatus ?argCreator ?argCreator2 ?argCreator3 ?argDiscoverDate#ISO ?Modification date#-F[M d Y, g:i:s a] format=template mainlabel=- template=DefaultTable sort=argDiscoverDate order=descending limit=500

}} {{

  1. ask: argType::OfficialargStatus::On HoldargDiscoverDate::!1970argPageType::rootpageargName::!~Waking Titan
?argName ?argStatus ?argCreator ?argCreator2 ?argCreator3 ?argDiscoverDate#ISO ?Modification date#-F[M d Y, g:i:s a] format=template mainlabel=- template=DefaultTable sort=argDiscoverDate order=descending limit=500

}} {{

  1. ask: argType::OfficialargStatus::DiscontinuedargDiscoverDate::!1970argPageType::rootpageargName::!~Waking Titan
?argName ?argStatus ?argCreator ?argCreator2 ?argCreator3 ?argDiscoverDate#ISO ?Modification date#-F[M d Y, g:i:s a] format=template mainlabel=- template=DefaultTable sort=argDiscoverDate order=descending limit=500

}}

{{#ask:argType::OfficialargPageType::rootpage|?argPopupContent|format=list}}

{{tableDraw
| tableType   = small
| nameFilter  = ~*Waking Titan*
| pageFilter  = subpage
}}

Results in...

{{
  1. ask: argPageType::subpage argName::~*Waking Titan*argDiscoverDate::!1970
Name Description Last Edited
?argName ?argDescription ?Modification date#-F[M d Y, g:i:s a] format=template mainlabel=- template=smallTable sort=argName order=descending limit=500

}}


Parameters
Parameter Description Default Accepted Values Type Status
tableType controls the format of the table default small String Optional
pageFilter defines the page type of pages returned subpage or rootpage String Optional
type defines the type of pages returned Official, Unofficial, or Investigation String Optional
cat defines the category of page returned any valid category name, ie Waking Titan, Official, etc String Optional
nameFilter defines an string with optional comparators which returned page names will be compared to string with or without comparators, ie ~Waking Titan, ~Waking Titan*, Frog Fractions 2 String with optional comparators Optional