Template:FAQItemNL: Difference between revisions
Jump to navigation
Jump to search
Tag: Undo |
m (add optional id, linkto icon) |
||
| Line 2: | Line 2: | ||
<big>FAQItem usage</big> | <big>FAQItem usage</big> | ||
Optional: <code>| id = custom-id</code> | |||
Required: <code>| question =</code> | |||
Required: <code>| answer =</code> | |||
If <code>id</code> is provided, a link icon will appear beside the question. | |||
---- | ---- | ||
<nowiki>{{FAQItem | |||
| id = optional-custom-id | |||
| question = Your question | |||
| answer = Your answer | |||
}}</nowiki> | |||
---- | |||
</noinclude> | |||
< | <html> | ||
<details class="faq-item"{{#if:{{{id|}}}| id="{{{id}}}"|}}> | |||
<summary style="font-weight: bold; font-size:larger;"> | |||
</html> | |||
| | <!-- Question text --> | ||
{{{question|Question}}} | |||
| | <!-- Link icon (only if id is provided) --> | ||
{{#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"> | ||
</html> | |||
{{{answer|Answer}}} | |||
<html> | <html> | ||
</blockquote> | </blockquote> | ||
</details> | </details> | ||
</html> | </html> | ||
Revision as of 06:32, 23 February 2026
FAQItem usage
Optional: | id = custom-id
Required: | question =
Required: | answer =
If id is provided, a link icon will appear beside the question.
{{FAQItem | id = optional-custom-id | question = Your question | answer = Your answer }}
Question
{{#if:|
🔗
|}}
Answer