Template:FAQ row: Difference between revisions
Template page
More actions
Created page with "<div {{#if:{{{index|}}}|id="Q{{{index}}}"}} class="faqrow mw-collapsible {{#ifeq:{{{show|}}}|yes||{{#ifeq:{{#invoke:String|find|{{FULLPAGENAME}}|/FAQ}}|0|mw-collapsed|{{#ifeq:{{{show|}}}|no|mw-collapsed|}}}}}}"> <templatestyles src="FAQ row/styles.css" /> <div class="faqrow-title">{{#if:{{{index|}}}|Q{{{index}}}:}} {{{q|}}}</div> <div class="faqrow-body mw-collapsible-content">{{#if:{{{index|}}} |{{#if:{{#invoke:ustring|match|{{{a|}}}|^[*#:;]}} |'''A{{{index}}}:''' {{{a|..." |
No edit summary |
||
Line 1: | Line 1: | ||
<div {{#if:{{{index|}}}|id="Q{{{index}}}"}} class="faqrow mw-collapsible {{#ifeq:{{{show|}}}|yes||{{#ifeq:{{#invoke:String|find|{{FULLPAGENAME}}|/FAQ}}|0|mw-collapsed|{{#ifeq:{{{show|}}}|no|mw-collapsed|}}}}}}"> | <div {{#if:{{{index|}}}|id="Q{{{index}}}"}} class="faqrow mw-collapsible {{#ifeq:{{{show|}}}|yes||{{#ifeq:{{#invoke:String|find|{{FULLPAGENAME}}|/FAQ}}|0|mw-collapsed|{{#ifeq:{{{show|}}}|no|mw-collapsed|}}}}}}"> | ||
<templatestyles src="FAQ row/styles.css" /> | <templatestyles src="Template:FAQ row/styles.css" /> | ||
<div class="faqrow-title">{{#if:{{{index|}}}|Q{{{index}}}:}} {{{q|}}}</div> | <div class="faqrow-title">{{#if:{{{index|}}}|Q{{{index}}}:}} {{{q|}}}</div> | ||
<div class="faqrow-body mw-collapsible-content">{{#if:{{{index|}}} | <div class="faqrow-body mw-collapsible-content">{{#if:{{{index|}}} |
Latest revision as of 22:53, 15 March 2025
This template uses TemplateStyles: |
Use this template on FAQ subpages.
Parameters
Use
There are three main features:
- "index", numbers a specific FAQ. You can link to each specific FAQ that has a unique index on a particular page. For example, to link to FAQ 2 for the Global warming FAQ page, "Talk:Global warming/FAQ". Follows the pattern "#Q{index}".
- "q", stands for question
- "a", stands for answer.
{{FAQ row
|index=1
|q=This is some question text...
|a=This is some answer text...
}}
Q1: This is some question text...
A1: This is some answer text...
Show
The box hides the answer on talk page and shows it on the /FAQ page. You may override this by adding "show=yes" so that the answer is always shown, or "show=no" so that the answer is always hidden.
{{FAQ row
|show=yes
|index=2
|q=This is some question text...
|a=This is some answer text...
}}
Q2: This is some question text...
A2: This is some answer text...
See also
Similar templates:
- {{FAQ}} – basic, non-collapsed list
- {{FAQ row}} – collapsed questions
- {{FAQ group begin}} – groups questions
- {{FAQ group end}} – groups questions
- {{FAQ page}} – message to be placed on top of separate FAQ pages
- {{Round in circles}} – not a FAQ (but will link to one); warns against rehashing debates
- {{Circular definition}}