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
 
(70 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"
 
! FAQ for
'''FAQ for:''' [[../]]
|{{#ifeq: {{BASEPAGENAME}} | FAQ | Main [[FAQ]] |  [[../]]
 
{{!}}-
{{#cargo_query:tables=Events,Events__FAQ
! Event FAQs
|fields=IF( _pageName = 'Lemonade', 'One dollar', IF ( _pageName = 'Fruit punch', 'Two dollars', 'Three dollars' ) )=Price
{{!}} {{#cargo_query:tables=Events,Events__FAQs
|where=_pageName = 'Log - April 2025'
|fields=concat('[[',Events__FAQs._value,'|{{GetSubpage{{!}}',Events__FAQs._value,'}}]]')=outputCol
|join on=Events._ID=Events__FAQ._rowID
|where=_pageName = '{{BASEPAGENAME}}'
|join on=Events._ID=Events__FAQs._rowID
|group by=Events__FAQs._value
}}
}}
}}
|-
!'''FAQ Page'''
| [{{{Link}}} link]
|}


{{#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]])


{{QuestionQuery|FAQ Page|{{PAGENAME}}}}


'''Event FAQs:''' {{#arraymap: {{#cargo_query:tables=Events,Events__FAQ
{{#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]])
|fields=Events__FAQ._value
|where=_pageName = 'Log - April 2025'
|join on=Events._ID=Events__FAQ._rowID
}}|,|pg|pg}}
 
 
{{#cargo_query:tables=Questions|fields=Link=QLink,Topics,DateAsked,QuestionText,DateAnswered,AnswerText|where=QuestionFaqPage = '{{PAGENAME}}'}}
 
{{#formlink:form=Question|link text=Add a question |returnto={{FULLPAGENAME}}| query string=Question[QuestionFaqPage]={{FULLPAGENAME}}}}


[[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.