Template:FAQItem: Difference between revisions

From Bose Portable PA Encyclopedia
Jump to navigation Jump to search
m (added optional id parameter, auto-generated ID fallback, link to this question icon)
m (Undo revision 25442 by ST (talk))
Tag: Undo
Line 2: Line 2:
<big>FAQItem usage</big>
<big>FAQItem usage</big>


# Optional: | id = custom-id
# Copy text between the horizontal lines for each Question with Answer
# Required: | question =
# Put the Question after | question =
# Required: | answer =
# Put the Answer after | answer =


If no id is provided, one will be auto-generated from the question text.
----
 
<nowiki>{{</nowiki>'''FAQItem'''
 
| question =
 
| answer =
 
<nowiki>}}</nowiki>


----
----
<nowiki>{{FAQItem
 
| id      = optional-custom-id
The FAQItem will render as it appears below this line.
| question = Your question
 
| answer  = Your answer
}}</nowiki>
----
----
</noinclude>
</noinclude>


<!-- Generate an ID if none is provided -->
{{#vardefine:faqid |
  {{#if:{{{id|}}}
    | {{{id}}}
    | {{#replace:{{lc:{{{question}}}}}| |-}}
  }}
}}
<html>
<details class="faq-item" id="{{#var:faqid}}">
<summary style="font-weight: bold; font-size:larger;">
</html>
<!-- Question text -->
{{{question|Question}}}
<!-- Link icon -->
<html>
<html>
<a href="#{{#var:faqid}}" class="faq-link-icon" style="margin-left:8px; text-decoration:none;">🔗</a>
<details class="faq-item">
</summary>
<summary style="font-weight: bold; font-size:larger;"></html>{{{question|Question}}}<html></summary>
 
<blockquote class="faq-answer">
<blockquote class="faq-answer">
</html>
</html>{{{answer|Answer}}}<html>
{{{answer|Answer}}}
<html>
</blockquote>
</blockquote>
</details>
</details>
</html>
</html>

Revision as of 06:27, 23 February 2026

FAQItem usage

  1. Copy text between the horizontal lines for each Question with Answer
  2. Put the Question after | question =
  3. Put the Answer after | answer =

{{FAQItem

| question =

| answer =

}}


The FAQItem will render as it appears below this line.



Question

Answer