Template:BTDB2 change list by name: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{autofill}}{{#cargo_query:table=btdb2_changes | <includeonly>{{autofill}}{{#cargo_query:table=btdb2_changes | ||
|fields=CONCAT("<h{{{header level|3}}}>[[", _pageName, "|Version ", version, "]] ", IF(version_note != "", CONCAT("(", version_note, ")"), ""), "</h{{{header level|3}}}>\n", | |fields=CONCAT("<h{{{header level|3}}}>[[", _pageName, "|Version ", version, "]] ", IF(version_note != "", CONCAT("(", version_note, ")"), ""), "</h{{{header level|3}}}>\n", | ||
GROUP_CONCAT(CONCAT(IF(quote != "", CONCAT("{", "{quote", "{{!}}", quote, "{{!}}Update notes}", "}\n"), ""), "\n", changes) ORDER BY priority, changes | GROUP_CONCAT(CONCAT(IF(quote != "", CONCAT("{", "{quote", "{{!}}", quote, "{{!}}Update notes}", "}\n"), ""), "\n", changes) ORDER BY priority DESC, changes SEPARATOR "\n")) = a | ||
|where=names HOLDS "{{{1|}}}"{{#if:{{{2|}}}| OR names HOLDS "{{{2|}}}"}} | |where=names HOLDS "{{{1|}}}"{{#if:{{{2|}}}| OR names HOLDS "{{{2|}}}"}} | ||
Revision as of 06:06, 15 January 2025
Uses Cargo to generate a list of changes that apply to a specific key.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | 1 | The key to use for the Cargo query. Will display a list of changes that contain this key in the "names" column with matching capitalization and spacing.
| String | required |
| Name 2 | 2 | A second key to use for the Cargo query. If specified, changes containing both the names will be displayed in the query.
| String | optional |
| Header level | header level | The level of section headers to use for the list.
| Number | optional |
Example usage
{{BTDB2 change list by name|Bot Factory}}
| This article or section uses Cargo to generate its content. It will automatically fill up as other articles are completed. To add to this section, create the articles it is looking up. Do not add content to this section manually and do not remove this notice until you are sure this section is complete. |
Function: CargoSQLQuery::run Query: SELECT CONCAT("<h3>Version ", version, " ", IF(version_note != "", CONCAT("(", version_note, ")"), ""), "</h3>\n", GROUP_CONCAT(CONCAT(IF(quote != "", CONCAT("{", "{quote", "|", quote, "|Update notes}", "}\n"), ""), "\n", changes) ORDER BY priority DESC, changes SEPARATOR "\n")) AS `a` FROM `cargo__btdb2_changes` `btdb2_changes` WHERE `btdb2_changes`.`_ID` IN (SELECT `_rowID` FROM `cargo__btdb2_changes__names` WHERE `_value`= "Bot Factory") GROUP BY _pageName, version, version_note ORDER BY (version+0) LIMIT 100