Difference between revisions of "Template:FAQList"
(Created page with "<noinclude> This template wraps multiple FAQItem entries and provides a pure‑CSS Expand All / Collapse All toggle using the checkbox hack. Usage: <nowiki>{{FAQList| cont...") |
m |
||
| (16 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
| − | + | <big>FAQList usage</big> | |
| − | |||
| − | + | # Wrap multiple FAQItem entries inside this template | |
| + | # Put all FAQItem calls after | content = | ||
| + | # Each FAQItem will appear inside a single FAQ list with Expand/Collapse All controls | ||
| − | <nowiki>{{FAQList| | + | ---- |
| − | + | ||
| − | {{FAQItem|question= | + | <nowiki>{{</nowiki>'''FAQList''' |
| − | {{FAQItem|question= | + | |
| − | }}</nowiki> | + | | content = |
| − | </ | + | <nowiki>{{</nowiki>FAQItem |
| + | |question = question 1 | ||
| + | |answer = answer 1 | ||
| + | <nowiki>}}</nowiki> | ||
| + | |||
| + | <nowiki>{{</nowiki>FAQItem | ||
| + | |question = question 2 | ||
| + | |answer = answer 2 | ||
| + | <nowiki>}}</nowiki> | ||
| + | |||
| + | <nowiki>}}</nowiki> | ||
| + | |||
| + | The FAQList will render as it appears below this line. | ||
| + | ---- | ||
| + | {{FAQList | ||
| + | |||
| + | | content = | ||
| + | {{FAQItem | ||
| + | |question = question 1 | ||
| + | |answer = answer 1 | ||
| + | }} | ||
| − | + | {{FAQItem | |
| − | + | |question = question 2 | |
| − | + | |answer = answer 2 | |
| − | + | }} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | }} | |
| − | |||
| − | + | This template wraps multiple FAQItem entries and provides Expand All / Collapse All | |
| − | + | using site-level JavaScript in MediaWiki:Common.js. | |
| − | + | </noinclude> | |
| − | |||
| − | </ | ||
| − | < | + | <div class="faq-list" > |
| − | < | + | <div class="faq-controls"> |
| + | <span class="faq-expand-all" style="cursor:pointer; font-weight:bold;">Expand all</span> | <span class="faq-collapse-all" style="cursor:pointer; font-weight:bold;">Collapse all</span> | ||
| + | </div> | ||
{{{content}}} | {{{content}}} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
</div> | </div> | ||
Latest revision as of 15:30, 10 February 2026
FAQList usage
- Wrap multiple FAQItem entries inside this template
- Put all FAQItem calls after | content =
- Each FAQItem will appear inside a single FAQ list with Expand/Collapse All controls
{{FAQList
| content =
{{FAQItem
|question = question 1
|answer = answer 1
}}
{{FAQItem
|question = question 2
|answer = answer 2
}}
}}
The FAQList will render as it appears below this line.
| Collapse all
question 1
answer 1
question 2
answer 2
This template wraps multiple FAQItem entries and provides Expand All / Collapse All using site-level JavaScript in MediaWiki:Common.js.
| Collapse all
{{{content}}}