Template:FAQItemNL: Difference between revisions

m added id parameter to allow distinct ids in rendered page
m ST moved page Template:FAQItem to Template:FAQItemNL: swapped with FAQItemL (makes link)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
<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>
<big>FAQItem usage</big>
<big>FAQItem usage</big>


1. Optional: <code>| id = custom-id</code> 
# Copy text between the horizontal lines for each Question with Answer
2. Required: <code>| question =</code> 
# Put the Question after | question =
3. Required: <code>| answer =</code>
# Put the Answer after | answer =
 
----
 
<nowiki>{{</nowiki>'''FAQItem'''


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


----
| answer =
<nowiki>{{FAQItem


| id      = optional-custom-id
<nowiki>}}</nowiki>


| question = Your question
----


| answer  = Your answer
The FAQItem will render as it appears below this line.


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


<html>
<html>
<details class="faq-item"{{#if:{{{id|}}}| id="{{{id}}}"|}}><summary style="font-weight: bold; font-size:larger;">{{{question|Question}}}{{#if:{{{id|}}}| <a href="#{{{id}}}" class="faq-link-icon" style="margin-left:8px; text-decoration:none;">🔗</a>|}}</summary>
<details class="faq-item">
<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>