Template:FAQItemNL: Difference between revisions

From Bose Portable PA Encyclopedia
Jump to navigation Jump to search
mNo edit summary
m (added optional id parameter, auto-generated ID fallback, link to this question icon)
Line 2: Line 2:
<big>FAQItem usage</big>
<big>FAQItem usage</big>


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


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


<nowiki>{{</nowiki>'''FAQItem'''
<!-- Generate an ID if none is provided -->
{{#vardefine:faqid |
  {{#if:{{{id|}}}
    | {{{id}}}
    | {{#replace:{{lc:{{{question}}}}}| |-}}
  }}
}}


| question =  
<html>
<details class="faq-item" id="{{#var:faqid}}">
<summary style="font-weight: bold; font-size:larger;">
</html>


| answer =
<!-- Question text -->
{{{question|Question}}}


<nowiki>}}</nowiki>
<!-- Link icon -->
 
<html>
----
<a href="#{{#var:faqid}}" class="faq-link-icon" style="margin-left:8px; text-decoration:none;">🔗</a>
 
</summary>
The FAQItem will render as it appears below this line.
 
----
</noinclude>


<blockquote class="faq-answer">
</html>
{{{answer|Answer}}}
<html>
<html>
<details class="faq-item">
<summary style="font-weight: bold; font-size:larger;"></html>{{{question|Question}}}<html></summary>
<blockquote class="faq-answer">
</html>{{{answer|Answer}}}<html>
</blockquote>
</blockquote>
</details>
</details>
</html>
</html>

Revision as of 06:22, 23 February 2026

FAQItem usage

  1. Optional: | id = custom-id
  2. Required: | question =
  3. Required: | answer =

If no id is provided, one will be auto-generated from the question text.


{{FAQItem | id = optional-custom-id | question = Your question | answer = Your answer }}



{{#vardefine:faqid |

 {{#if:
   | {{{id}}}
   | {{#replace:{{{question}}}| |-}}
 }}

}}

Question

🔗

Answer