Template:QuestionQuery: Difference between revisions
From Karteria DWRP Wiki
Jump to navigationJump to search
Tag: Undo |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly | <includeonly>{{#ifeq: {{{1|}}}| FAQ Page | faqalf | ||
{{#cargo_query:tables=Questions|fields= | {| class="wikitable" | ||
|where={{#arraymap: {{{2|}}}|,| | ! 1 | ||
|group_by= _pageName, trim(QuestionFaqPage),Link,Topics__full,AskedBy,DateAnswered,DateAsked,QuestionText,AnswerText}}| | ! 2 | ||
! 3 | |||
{{#cargo_query:tables=Questions|fields= _pageName = questionPage, trim(QuestionFaqPage)=faqPage,Link = questionLink, Topics__full=questionTopics, AskedBy = questionFrom,DateAnswered=answerDate, DateAsked = askedDate, QuestionText=Question_Text, AnswerText=Answer_Text | |||
|where= {{#arraymap: {{{2|}}}|,|xx| QuestionFaqPage = 'xx' | new_delimiter= OR }} | |||
|group_by= _pageName = questionPage, trim(QuestionFaqPage)=faqPage,Link = questionLink, Topics__full=questionTopics, AskedBy = questionFrom,DateAnswered=answerDate, DateAsked = askedDate, QuestionText=Question_Text, AnswerText=Answer_Text | |||
|format=template | |||
|template=TestQTemplate | |||
|delimiter=\n}} | |||
|} | |||
| | |||
{{#ifeq: {{{1|}}} | Topic | topic | {{#ifeq: {{{1|}}} | Topic | topic | ||
{{#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 | {{#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 | ||
| Line 10: | Line 19: | ||
| {{#ifeq: {{{1|}}} | Question | question | | {{#ifeq: {{{1|}}} | Question | question | ||
{{#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 | {{#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 | ||
|where= {{#arraymap: {{{2|}}}|,| | |where= {{#arraymap: {{{2|}}}|,|xx| _pageName = 'xx' | new_delimiter= OR }} | ||
|group_by=QuestionFaqPage,Link,Topics__full,AskedBy,QuestionText,AnswerText | |group_by=QuestionFaqPage,Link,Topics__full,AskedBy,QuestionText,AnswerText | ||
}} | }} | ||
|supply FAQ Page, Topic or Question as first parameter }}}}}}</div></includeonly><noinclude>{{/doc}}</noinclude> | |supply FAQ Page, Topic or Question as first parameter }}}}}}</div></includeonly><noinclude>{{/doc}}</noinclude> | ||
Revision as of 03:22, 16 December 2025
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Query type | 1 | no description
| Unknown | required |
| Value | 2 | Limiting value for the query
| Unknown | optional |