Template:FAQ/doc

From the AARoads Wiki: Read about the road before you go
Jump to navigation Jump to search

Usage

To create an FAQ sub-page (on which you will write your series of questions and answers) begin by placing the FAQ template on the top of the page. To do this, edit the page and on the top place some version of the following text:
{{FAQ}}
produces the standard heading


Any questions and answers that are eventually placed on the FAQ sub-page will not actually appear until the reader clicks on the "show" button.

If you wish for your FAQ to refer to the FAQ of some other page (which may be useful if the same questions arise on different but closely related pages and you don't want to make a different FAQ page for each) you can use the "page" parameter to refer to that page as in this example for the talk page of the article Anita Sarkeesian:
{{FAQ|page=Talk:Anita Sarkeesian/FAQ}}
which will produce the similar heading


which is visually identical to the use of the {{FAQ}} template but "shows" the reader the FAQ for a different page.

If you wish for readers to be aware of the existence of another FAQ page but not use that page for your own FAQ you can add the parameter "see also" which will add the text "see also" and a link to that other page, as in this example which allows the reader to also view the FAQ page for all of Wikipedia (note that the use of the "see also" parameter requires that the page it refers to be enclosed in double brackets to create the actual link):

{{FAQ|see also=[[Wikipedia:FAQ]]}}
which produces this heading:

You may wish to specify whether the list of questions and answers is to be shown to readers as collapsed or expanded. To override any default settings you can add the "collapsed" parameter and indicate its value as either "no" or "yes". The default setting for this parameter is "yes".
{{FAQ|collapsed=yes}}
which produces the heading

Or you can specify that the FAQ list should not be collapsed by setting "collapsed" to "no" like this:

{{FAQ|collapsed=no}}
which will produce a heading like this one, with all of the questions and answers displayed as bold Qs and As:

You can see that in each of the preceding examples the word "edit" appears as blue linked text on the left of the heading next to the large blue question mark. This link allows readers to quickly edit the questions and answers themselves. If you wish for readers to actually visit the FAQ page itself before editing its contents you can set the "quickedit" parameter of the template to "no" (the default setting is "yes") as in this example:
{{FAQ|quickedit=no}}
which will produce a heading that looks like this:

You may also wish for your FAQ heading to appear as a small box on the right side of the page rather than as a large heading across the top of it. To do this, you can set the "small" parameter of the template to "yes" (the default setting is "no") as in the following example:
{{FAQ|small=yes}}
which will produce a smaller heading like this:


When an FAQ appears on a talk page, the banner has a different color (light tan) than when it appears elsewhere (light blue). This helps readers distinguish what kind of FAQ page they are reading. Here is what the banner looks like on a talk page:

To actually create your list of questions and answers, you should place the {{FAQ}} template on the page for which you are going to create an FAQ list along with any of the parameters mentioned above and then click "Save". You will see that the page now has an FAQ banner across the top. To get to the as-yet-to-be-created FAQ sub-page click on the "edit" link in the FAQ banner (or the "faq page" link, if you set "quickedit" to "no"). For an example of a functioning FAQ section on a talk page, consider visiting Talk:Tao: the talk page has a FAQ section at the top which can be used as a model.

Section headings

Section headings should not normally be used within the FAQ template since they will show in the table of contents of the page where the FAQ template is transcluded. A way around this is to use markup like the following: <includeonly>'''</includeonly><noinclude>==</noinclude>Heading name<noinclude>==</noinclude><includeonly>'''</includeonly>, on a line by itself. On the /FAQ content page itself, when not transcluded, it will have navigable headings as if it were a line reading ==Heading name==. When transcluded into the FAQ template (or elsewhere), it will have bold pseudo-headings, as if it were a line reading '''Heading name'''. (This is a useful trick for long {{To do}} lists, too.)

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:FAQ in articles based on its TemplateData.

TemplateData for FAQ

<templatedata>{ "description": "This template creates an FAQ sub-page on an article page or talk page. The FAQ heading will appear on the top of the associated page before that page's content, and as it is a link to a sub-page, its content does not become archived at a later date (though it can always be removed, of course).", "params": { "1": { "label": "Page title", "description": "The name of the page that the FAQ should actually show, if different from the page on which the template is used", "example": "Talk:Anita Sarkeesian/FAQ", "type": "wiki-page-name" }, "2": { "label": "See also", "description": "A page which the reader may also wish to know about; if used, this will appear in the FAQ heading. Page name must be enclosed within double brackets", "example": "Wikipedia:FAQ", "type": "string" }, "3": { "label": "Collapsed", "description": "Determines whether or not to show the reader the list of FAQs before clicking on the Show button", "example": "no", "type": "boolean" }, "4": { "label": "Quickedit", "description": "If set to no, the reader will see linked text saying FAQ page on the left side of the header; if set to yes, the reader will see the linked word Edit", "example": "no", "type": "boolean" }, "5": { "label": "Small", "description": "If set to yes, the reader will see the FAQ header in a reduced box on the right side of the page; if set to no, the header will be full-size", "example": "yes", "type": "boolean", "default": "no" } }, "paramOrder": [ "1", "2", "3", "4", "5" ], "format": "inline" }</templatedata>

See also

Similar templates: