Template:FAQItemNL: Difference between revisions

From Bose Portable PA Encyclopedia
Jump to navigation Jump to search
m (add optional id, linkto icon)
m (ST moved page Template:FAQItem to Template:FAQItemNL: swapped with FAQItemL (makes link))
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
<big>FAQItem usage</big>
<templatedata>
{
  "description": "Creates a FAQ item",
  "params": {
    "text": {
      "label": "Question",
      "description": "The Question",
      "type": "string",
      "required": true
    },
    "answer": {
      "label": "Answer",
      "description": "The Answer to the question",
      "type": "string",
      "required": true
    }
  }
}
</templatedata>


Optional: <code>| id = custom-id</code> 


Required: <code>| question =</code>
<big>FAQItem usage</big>


Required: <code>| answer =</code> 
# Copy text between the horizontal lines for each Question with Answer
# Put the Question after | question =
# Put the Answer after | answer =


If <code>id</code> is provided, a link icon will appear beside the question.
----


----
<nowiki>{{</nowiki>'''FAQItem'''
<nowiki>{{FAQItem
| id      = optional-custom-id
| question = Your question
| answer  = Your answer
}}</nowiki>
----
</noinclude>


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


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


<!-- Link icon (only if id is provided) -->
<nowiki>}}</nowiki>
{{#if:{{{id|}}}|
<html><a href="#{{{id}}}" class="faq-link-icon" style="margin-left:8px; text-decoration:none;">🔗</a></html>
|}}


<html>
----
</summary>


<blockquote class="faq-answer">
The FAQItem will render as it appears below this line.
</html>


{{{answer|Answer}}}
----
</noinclude>


<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>

Latest revision as of 01:07, 27 February 2026

Creates a FAQ item

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Questiontext

The Question

Stringrequired
Answeranswer

The Answer to the question

Stringrequired


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