Template:FAQList: Difference between revisions

From Bose Portable PA Encyclopedia
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(8 intermediate revisions by the same user not shown)
Line 11: Line 11:


| content =  
| content =  
     {{FAQItem
     <nowiki>{{</nowiki>FAQItem
     |question = question 1
     |question = question 1
     |answer  = answer 1
     |answer  = answer 1
     }}
     <nowiki>}}</nowiki>


     {{FAQItem
     <nowiki>{{</nowiki>FAQItem
     |question = question 2
     |question = question 2
     |answer  = answer 2
     |answer  = answer 2
     }}
     <nowiki>}}</nowiki>


<nowiki>}}</nowiki>
<nowiki>}}</nowiki>
----


The FAQList will render as it appears below this line.
The FAQList will render as it appears below this line.
----
----
</noinclude>
{{FAQList
 
<div class="faq-list">


<div class="faq-controls">
  <span class="faq-expand-all" style="cursor:pointer; font-weight:bold;">Expand all</span>&nbsp;|&nbsp;<span class="faq-collapse-all" style="cursor:pointer; font-weight:bold;">Collapse all</span>
</div>
{{{content
| content =  
| content =  
     {{FAQItem
     {{FAQItem
Line 42: Line 32:
     |answer  = answer 1
     |answer  = answer 1
     }}
     }}
     {{FAQItem
     {{FAQItem
     |question = question 2
     |question = question 2
     |answer  = answer 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>&nbsp;|&nbsp;<span class="faq-collapse-all" style="cursor:pointer; font-weight:bold;">Collapse all</span>
</div>
{{{content}}}
</div>


 
<noinclude>
}}}
[[Category:FAQ]]
 
</noinclude>
</div>

Latest revision as of 19:57, 21 February 2026

FAQList usage

  1. Wrap multiple FAQItem entries inside this template
  2. Put all FAQItem calls after | content =
  3. 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.


 Expand all | 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.

 Expand all | Collapse all

{{{content}}}