Template:QuestionQuery: Difference between revisions

From Karteria DWRP Wiki
Jump to navigationJump to search
Icie (talk | contribs)
No edit summary
Icie (talk | contribs)
No edit summary
 
(51 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="question-table-wrapper">
<includeonly>{{#ifeq: {{{1|}}} | FAQ Page || {{#ifeq: {{{1|}}} | Topic || {{#ifeq: {{{1|}}} | Question |
 
|{{#ifeq: {{{1|}}} | Keyword |
{{#ifeq: {{{1|}}}| FAQ Page | faqalf
|QuestionQuery error: Supply FAQ Page, Topic, Keyword or Question as first parameter }}}}}}}}
  {{#cargo_query:tables=Questions|fields= CONCAT('{{Question Information {{!}} questionPage = ',_pageName,'{{!}}faqPage=',trim(QuestionFaqPage),' {{!}}questionLink = ',Link,'{{!}}questionTopics=', Topics__full,'{{!}}questionFrom=', AskedBy,'{{!}}answerDate=',DateAnswered, '{{!}}askedDate=',  DateAsked,'}}')=Question_Information, QuestionText=Question_Text, AnswerText=Answer_Text
{{#ifexpr: {{#ifeq: {{{1|}}} | FAQ Page | 1 | 0}} or {{#ifeq: {{{1|}}} | Topic | 1 | 0}} or {{#ifeq: {{{1|}}} | Question | 1 | 0}} or {{#ifeq: {{{1|}}} | Keyword | 1 | 0}} |
|where={{#arraymap: {{{2|}}}|,|tk| QuestionFaqPage = 'tk' | new_delimiter= OR }}
{{#cargo_query:tables=Questions|fields= _pageName = questionPage, trim(QuestionFaqPage)=faqPage,Link = questionLink, Topics__full=questionTopicsAskedBy = questionFrom,DateAnswered=answerDate, DateAsked = askedDate, QuestionText=Question_Text, AnswerText=Answer_Text
|group_by= 1,2,3}}|
|where= {{#ifeq: {{{1|}}}| FAQ Page | {{#arraymap: {{{2|}}}|,|xx| QuestionFaqPage = 'xx' |\s or \s}} |
    {{#ifeq: {{{1|}}} | Topic | topic
  {{#ifeq: {{{1|}}} | Topic | {{#arraymap: {{{2|}}}|,|xx| Topics HOLDS 'xx' |\s or \s}}|
      {{#cargo_query:tables=Questions|fields= CONCAT('{{Question Information {{!}} questionPage = ',_pageName,'{{!}}faqPage=',trim(QuestionFaqPage),' {{!}}questionLink = ',Link,'{{!}}questionTopics=', Topics__full,'{{!}}questionFrom=', AskedBy,'{{!}}answerDate=',DateAnswered, '{{!}}askedDate=',  DateAsked,'}}')=Question_Information, QuestionText=Question_Text, AnswerText=Answer_Text
{{#ifeq: {{{1|}}} | Question | {{#arraymap: {{{2|}}}|,|xx| _pageName = 'xx' |\s or \s}}  
|where= {{#arraymap: {{{2|}}}|,|x| Topics HOLDS 'x' | new_delimiter= OR }}
  |
|group_by=QuestionFaqPage,Link,Topics__full,AskedBy,QuestionText,AnswerText
{{#ifeq: {{{1|}}} | Keyword | {{#arraymap: {{{2|}}}|,|xx| QuestionText like '%xx%' or AnswerText like '%xx%' |\s or \s}}
}} }}
  }}
}}
}}
| {{#ifeq: {{{1|}}} | Question | question
|group by= Questions._pageName, Questions.QuestionFaqPage,Questions.Link, Questions.Topics__full,  Questions.AskedBy,Questions.DateAnswered, Questions.DateAsked, Questions.QuestionText, Questions.AnswerText
      {{#cargo_query:tables=Questions|fields= CONCAT('{{Question Information {{!}} questionPage = ',_pageName,'{{!}}faqPage=',trim(QuestionFaqPage),' {{!}}questionLink = ',Link,'{{!}}questionTopics=', Topics__full,'{{!}}questionFrom=', AskedBy,'{{!}}answerDate=',DateAnswered, '{{!}}askedDate=',  DateAsked,'}}')=Question_Information, QuestionText=Question_Text, AnswerText=Answer_Text
|format=template
|where= {{#arraymap: {{{2|}}}|,|x| _pageName = 'x' | new_delimiter= OR }}
|template=QuestionQueryTableTemplate
|group_by=QuestionFaqPage,Link,Topics__full,AskedBy,QuestionText,AnswerText
|delimiter=\n
|intro={{{!}} class="wikitable mw-collapsible {{#if: {{{Collapsible|}}}| mw-collapsed}}"
! Information
! Question
! Answer
| outro={{!}}}
| offset={{{offset|}}}
| default= ''No results''
| order by=Questions.DateAnswered desc
}}
}}
|supply FAQ Page, Topic or Question as first parameter }}}}}}</div></includeonly><noinclude>{{/doc}}</noinclude>
}}</includeonly><noinclude>{{/doc}}</noinclude>

Latest revision as of 04:26, 18 January 2026

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Query type1

no description

Suggested values
FAQ Page Topic Question
Unknownrequired
Value2

Limiting value for the query

Suggested values
Shifting Log - April 2025/FAQ Page
Unknownoptional