Template:Item query: Difference between revisions

From Chinese Religious Text Authority
No edit summary
No edit summary
Line 9: Line 9:
tables=Item_infobox
tables=Item_infobox


|fields=_ID, _pageName=Entry, 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, YEAR(date)=Year
|fields=_pageName=Entry, 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, YEAR(date)=Year


|where=(title LIKE '%{{{title|}}}%' OR title_list HOLDS LIKE '%{{{title|}}}%') AND
|where=IF("{{{title|}}}" = "", TRUE, title LIKE '%{{{title|}}}%' OR title_list HOLDS LIKE '%{{{title|}}}%') AND
       IF("{{{publication_place|}}}" = "", TRUE, publication_places HOLDS LIKE '%{{{publication_place|}}}%') AND
       IF("{{{publication_place|}}}" = "", TRUE, publication_places HOLDS LIKE '%{{{publication_place|}}}%') 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|}}}")
       IF("{{{year_exact|}}}" = "", TRUE, YEAR(date) = "{{{year_exact|}}}")



Revision as of 18:17, 26 May 2021

This is the 'Item query' template. It should be called via the Form:Item query form.