Template:FAQ Page: Difference between revisions

From Karteria DWRP Wiki
Jump to navigationJump to search
Icie (talk | contribs)
No edit summary
Icie (talk | contribs)
No edit summary
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{#template_params:Link (label=FAQ Page Link)}}
{{#template_params:Link (label=FAQ Page Link)}}
{{#cargo_declare:_table=FAQ_Pages|Link=URL|_parentTables=Events}}
{{#cargo_declare:_table=FAQPages|Link=URL|_parentTables=Events}}
</noinclude><includeonly>{{#cargo_store:_table=FAQ_Pages}}
</noinclude><includeonly>{{#cargo_store:_table=FAQPages}}{| class="wikitable"
 
{| class="wikitable"
! FAQ for
! FAQ for
|{{#ifeq: {{BASEPAGENAME}} | FAQ | Main [[FAQ]] |  [[../]]
|{{#ifeq: {{BASEPAGENAME}} | FAQ | Main [[FAQ]] |  [[../]]
Line 10: Line 8:
! Event FAQs
! Event FAQs
{{!}} {{#cargo_query:tables=Events,Events__FAQs
{{!}} {{#cargo_query:tables=Events,Events__FAQs
|fields=concat('[[','{{BASEPAGENAME}}','/',Events__FAQs._value,'|',Events__FAQs._value,']]')=outputCol
|fields=concat('[[',Events__FAQs._value,'|{{GetSubpage{{!}}',Events__FAQs._value,'}}]]')=outputCol
|where=_pageName = '{{BASEPAGENAME}}'
|where=_pageName = '{{BASEPAGENAME}}'
|join on=Events._ID=Events__FAQs._rowID
|join on=Events._ID=Events__FAQs._rowID
|group by=Events__FAQs._value
}}
}}
}}
}}
Line 20: Line 19:
|}
|}


{{#cargo_query:tables=Questions|fields= CONCAT('[[',_pageName,'|wiki page]] [',Link,' link]')=Link, Topics, DateAsked, QuestionText, DateAnswered, AnswerText
{{#formlink:form=Question|link text=Add a question |returnto={{FULLPAGENAME}}| query string=Question[QuestionFaqPage]={{FULLPAGENAME}}}} | {{#formlink:form=EmptyQuestion|link text=Add a question using helper |returnto={{FULLPAGENAME}}| query string=Question[QuestionFaqPage]={{FULLPAGENAME}}}} ([[Helper/CopyScript|Helper/CopyScript]])
|where=QuestionFaqPage = '{{PAGENAME}}'
 
|layout=template
{{QuestionQuery|FAQ Page|{{PAGENAME}}}}
|template=Question Table Display}}


{{#formlink:form=Question|link text=Add a question |returnto={{FULLPAGENAME}}| query string=Question[QuestionFaqPage]={{FULLPAGENAME}}}}
{{#formlink:form=Question|link text=Add a question |returnto={{FULLPAGENAME}}| query string=Question[QuestionFaqPage]={{FULLPAGENAME}}}} | {{#formlink:form=EmptyQuestion|link text=Add a question using helper |returnto={{FULLPAGENAME}}| query string=Question[QuestionFaqPage]={{FULLPAGENAME}}}} ([[Helper/CopyScript|Helper/CopyScript]])


[[Category:FAQ_Pages]]
[[Category:FAQ_Pages]]
</includeonly>
</includeonly>

Latest revision as of 13:16, 9 January 2026

This is the "FAQ Page" template.

It should be called in the following format:

{{FAQ Page
|Link=
}}

Edit the page to see the template text.

This template defines the table "FAQPages". View table.