Template:TableDraw/doc: Difference between revisions
Jump to navigation
Jump to search
Created page with "<noinclude>{{Documentation subpage}} {{high-risk}}</noinclude> ;Description This is the {{t|tableDraw|...}} or '''Table draw''' meta-template. This template is used to create..." |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
;Description | ;Description | ||
This is the {{t|tableDraw|...}} or '''Table draw''' meta-template. This template is used to create datatables populated by data gathered from pages using {{t|argbox}}, {{t|autoArgbox}}, or {{t|argHeader}}. It can be used to display data in one of two table formats, <code>default</code> and <code>small</code>. | This is the {{t|tableDraw|...}} or '''Table draw''' meta-template. This template is used to create datatables populated by data gathered from pages using {{t|argbox}}, {{t|autoArgbox}}, or {{t|argHeader}}. The tables will automatically update based on data available to the page displayed. For example, adding a description or other additional data via an {{t|argbox}} or {{t|autoArgbox}} to a given page will cause tables showing data about that page to automatically display the new data the next time the page is viewed. It can be used to display data in one of two table formats, <code>default</code> and <code>small</code>. | ||
;Syntax | ;Syntax | ||
Type <code>{{t|tableDraw|...}}</code> somewhere, with parameters as shown below. | Type <code>{{t|tableDraw|...}}</code> somewhere, with parameters as shown below. | ||
| Line 46: | Line 46: | ||
| controls the format of the table | | controls the format of the table | ||
| default | | default | ||
| <code>small</code> | | <code>default</code> or <code>small</code> | ||
| String | | String | ||
| Optional | | Optional | ||
| 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 | ||
| Line 67: | Line 67: | ||
| defines the category of page returned | | defines the category of page returned | ||
| | | | ||
| any valid category name, ie <code>Waking Titan</code>, <code>Official<code>, etc | | any valid category name, ie <code>Waking Titan</code>, <code>Official</code>, etc | ||
| String | | String | ||
| Optional | | Optional | ||
| Line 74: | Line 74: | ||
| defines an string with optional comparators which returned [[Property:argName|page names]] will be compared to | | defines an string with optional comparators which returned [[Property:argName|page names]] will be compared to | ||
| | | | ||
| | | string with or without [https://www.semantic-mediawiki.org/wiki/Help:Search_operators#Comparators comparators], ie <code>~Waking Titan</code>, <code>~Waking Titan*</code>, <code>Frog Fractions 2</code> | ||
| String with optional comparators | | String with optional comparators | ||
| Optional | | Optional | ||
|} | |} | ||
Latest revision as of 01:24, 11 June 2018
| This is a documentation subpage for Template:TableDraw. It contains usage information, categories and other content that is not part of the original template page. |
| This template is used on a very large number of pages. To avoid large-scale disruption and unnecessary server load, any changes to it should first be tested in its /sandbox or /testcases subpages or in your own user subpage. The tested changes can then be added to this page in a single edit. Please consider discussing any changes on the talk page before implementing them. |
- 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}}. The tables will automatically update based on data available to the page displayed. For example, adding a description or other additional data via an {{argbox}} or {{autoArgbox}} to a given page will cause tables showing data about that page to automatically display the new data the next time the page is viewed. 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...
{{- 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
}} {{ |
?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
}} {{ |
?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
}} {{ |
?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
}} |
{{tableDraw
| tableType = small
| nameFilter = ~*Waking Titan*
| pageFilter = subpage
}}
Results in...
{{| 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 | default or 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 |