User:N8wilson/new FAQ/doc

Create a new on a /FAQ subpage.

This is a convenience template that helps correctly auto-fill the  parameter when creating s on /FAQ pages as well as automatically surround newly created s with properly coded   tags to make the   function as intended. can also be used to convert older templates in a single step.

This template has no visible effect when transcluded or safesubst:'ed.

Usage
This template is designed to be used in several different ways:

This is a convenience use case. Saving this wikitext will cause it to replace itself with a more complete list of all parameters in the template.
 * 1. Generate a skeleton for adding a new FAQ question:

can simply be replaced with This will replace itself with a call to and the old index will be preserved. If the index is a number, it will also be converted to a  in the new FAQ system so the question can be referenced individually.
 * 2. Migrate an older-style template to the newer  format

This method can also be used to correctly update an existing when adding a   to a question that does not already have one assigned. Replacing with  will add appropriate   tags around the item which are required for  s to work as intended.


 * 3. Manual use:

Fill in parameters manually. The  parameter has special restrictions. It may be left empty if you're not familiar with those requirements. See each parameter's description below for more details. If link-key is correctly completed, this template will create a and will also generate a copy of itself ready for substitution in "placeholder" mode (which is described next) with the an incremented link-key value already pre-filled.


 * 4. Placeholder:

If either of the  and   parameters are left empty, substituting this template will have no effect. Technically it will still substitute however the substitution results in another copy of the same substitution call to itself with all the same parameter values still set. This allows it to sit at the end of a FAQ page for future editors as a hint on how to fill in the next question that needs to be added. Once it's completed, as indicated in "Manual use" above, a new is created and the placeholder is re-generated with a new link-key value.

Parameters

 * index
 * A carryover from that may be displayed as the question number (i.e. index=5 &rarr; "Q5"). If this is provided as a numeric value, it may be used to create a   for the resulting  if the link-key parameter is not also set (link-key takes priority). Index does not have to be a number though. A value of "3.a." is perfectly fine. In such cases however, this template cannot automatically generate a suitable link-key as well.


 * q
 * Same usage as - the question text


 * a
 * Same usage as - the full answer text


 * short-a
 * Same usage as - a short answer for use by some templates


 * discussions
 * Same usage as - a list of links to relevant previous discussions contributing to the answer


 * wp-editor-notes
 * This is a dummy parameter that can be left blank or set to anything without any effect whatsoever on the resulting that gets created. It exists so this template can leave a helpful message to editors who might not initially see the result the expect when using this template. Values the template fills in here will always be wrapped in an HTML comment.


 * link-key
 * Stable and unique number that can be used to link directly to the created FAQ item. The same number must not be re-used for multiple FAQ items on the same FAQ page. If this is the first FAQ on a page, any number can be used. If there are existing FAQs already present, use 1 + the highest link-key already in use. When using with the link-key provided, the template will pre-generate a stub call to the next  item with the next available link-key pre-filled in this parameter. Usually if you find this parameter already completed  even if nothing else is filled in  the value should not need to be changed. To be clear that this is not the same number as the index  which may sometimes be displayed as the question number  it is considered good practice to set link-key to a 3 or 4 digit unique code. If link-key is provided, it will override any number in the index parameter.