Difference between revisions of "Template:FAQ row/doc"

From blackwiki
Jump to navigation Jump to search
imported>Gadget850
(→‎See also: {{FAQ templates see also}})
imported>Dpleibovitz
(Uses TemplateStyles)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
{{Uses TemplateStyles|Template:FAQ row/styles.css}}
 +
Use this template on FAQ subpages.
  
=== Usage ===
+
== Parameters ==
<code><nowiki>{{</nowiki>FAQ row
+
=== Use ===
  
|q=This is some question text...
+
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#Q2]]". Follows the pattern "#Q<span style="color:#888;">{index}</span>".
 +
# "q", stands for question
 +
# "a", stands for answer.
  
|a=This is some answer text...
+
<pre>
 +
{{FAQ row
 +
|index=1
 +
|q=This is some question text...
 +
|a=This is some answer text...
 +
}}
 +
</pre>
  
<nowiki>}}</nowiki></code>
+
<div style="background:#fff; padding:10px; border:1px dashed #888;">
 +
{{FAQ row
 +
|index=1
 +
|q=This is some question text...
 +
|a=This is some answer text...
 +
}}
 +
</div>
  
Yields:
+
===Show===
  
{{FAQ row|q=This is some question text...|a=This is some answer text...}}
+
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.
  
=== Combining with [[Template:FAQ]] ===
+
<pre>
Since {{tlx|FAQ}} transcludes from a /FAQ subpage, {{tlx|FAQ row}} should be used on the subpage.
+
{{FAQ row
 +
|show=yes
 +
|index=2
 +
|q=This is some question text...
 +
|a=This is some answer text...
 +
}}
 +
</pre>
 +
 
 +
<div style="background:#fff; padding:10px; border:1px dashed #888;">
 +
{{FAQ row
 +
|show=yes
 +
|index=2
 +
|q=This is some question text...
 +
|a=This is some answer text...
 +
}}
 +
</div>
 +
 
 +
== See also ==
  
=== See also ===
 
 
{{FAQ templates see also}}
 
{{FAQ templates see also}}
  

Latest revision as of 04:05, 16 June 2019

Script error: No such module "Uses TemplateStyles". Use this template on FAQ subpages.

Parameters

Use

There are three main features:

  1. "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#Q2". Follows the pattern "#Q{index}".
  2. "q", stands for question
  3. "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: