Template:FAQList: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 11: | Line 11: | ||
| content = | | content = | ||
{{FAQItem | <nowiki>{{</nowiki>FAQItem | ||
|question = | |question = question 1 | ||
|answer = | |answer = answer 1 | ||
}} | <nowiki>}}</nowiki> | ||
{{FAQItem | <nowiki>{{</nowiki>FAQItem | ||
|question = | |question = question 2 | ||
|answer = | |answer = answer 2 | ||
}} | <nowiki>}}</nowiki> | ||
<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> | </noinclude> | ||
<div class="faq-list" > | |||
<div class="faq-list"> | |||
<div class="faq-controls"> | <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> | <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> | </div> | ||
{{{content}}} | {{{content}}} | ||
</div> | |||
</ | <noinclude> | ||
[[Category:FAQ]] | |||
</noinclude> | |||