Template:Item query: Difference between revisions
From Chinese Religious Text Authority
No edit summary |
mNo edit summary |
||
(111 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
{{#cargo_query: | {{#cargo_query: | ||
tables=Item_infobox | tables=Item_infobox | ||
|fields=_pageName=Entry,creator_list__full=List of Creators,format=Format,publication_places__full=Publication | |fields=_pageName=Entry, pinyin_title=Library Pinyin Title, creator_list__full=List of Creators, format=Format, publication_places__full=Publication Place(s), publishers__full=Publisher(s), date=Date, date_start=Start Date, date_end=End Date | ||
|where=title LIKE '%{{{title|}}}%' AND publication_places HOLDS LIKE '%{{{publication_place|}}}%' AND format | |||
|where=IF("{{{title|}}}" = "", TRUE, title LIKE '%{{{title|}}}%' OR title_list HOLDS LIKE '%{{{title|}}}%') AND | |||
IF("{{{pinyin|}}}" = "", TRUE, pinyin_title LIKE '%{{{pinyin|}}}%') AND | |||
IF("{{{publication_place|}}}" = "", TRUE, publication_places HOLDS LIKE '%{{{publication_place|}}}%') AND | |||
IF("{{{format|}}}" = "", TRUE, format = '{{{format|}}}') AND | |||
IF("{{{creators|}}}" = "", TRUE, creator_list HOLDS LIKE '%{{{creators|}}}%') AND | |||
IF("{{{publisher|}}}" = "", TRUE, publishers HOLDS LIKE '%{{{publisher|}}}%') AND | |||
IF("{{{year_exact|}}}" = "", TRUE, YEAR(date) = "{{{year_exact|}}}" OR (YEAR(date_start) <= "{{{year_exact|}}}" AND YEAR(date_end) >= "{{{year_exact|}}}")) AND | |||
IF("{{{year_min|}}}" = "", TRUE, YEAR(date) >= "{{{year_min|}}}" OR YEAR(date_start) >= "{{{year_min|}}}") AND | |||
IF("{{{year_max|}}}" = "", TRUE, YEAR(date) <= "{{{year_max|}}}" OR YEAR(date_end) <= "{{{year_max|}}}") | |||
|group by=Item_infobox._ID | |group by=Item_infobox._ID | ||
|order by= | |||
|order by=-COALESCE(date, date_start) DESC | |||
|format=dynamic table | |format=dynamic table | ||
|rows per page=50 | |rows per page=50 |
Latest revision as of 08:24, 28 June 2023
This is the 'Item query' template. It should be called via the Form:Item query form.