Difference between revisions of "Template:FAQ"

From Wikicarpedia
Jump to navigation Jump to search
Line 1: Line 1:
<noinclude><languages />{{#switch: {{PAGELANGUAGE}}
<div id="{{{id|0}}}" class="{{{4|wica-top-spacing wica-bottom-spacing wica-visible}}}" style="width: {{#if: {{{width|}}} |{{{width|400px}}} | {{{3|400px}}} }}; max-width: 100%;">
| en = [[Category:Translatable_templates]]
|
}}
'''Description:'''<br/>
Create a FAQ box with header and body. If a clarification id is provided, it will be displayed in the bottom right corner in brackets. The same id can be used as an anchor for a link. An additional external id (ext id) can be also provided to refer to the CAR, for example in the same generated link. It uses default values for layout that can be overridden (classes and width).<br />
 
'''Params:'''
* header or param 1 (mandatory): Content displayed in the box header
* body or param 2 (mandatory): Content displayed in the box body
* id (optional): Clarification id shown on bottom right corner as a link in brackets. Only shown if provided.
* extid (optional): Additional clarification id (with CAR.XXX format) shown on bottom right corner as part of the link generated for param id. Only shown if provided.
* width or param 3 (optional + default): Box witdh. Default value = "400px". When device is smaller, then width will be set to 100% of space.
* class (optional + default): Wrapper div class string for box layout and separation, Default value = "wica-top-spacing wica-bottom-spacing wica-visible"
</noinclude><div id="{{{id|0}}}" class="{{{4|wica-top-spacing wica-bottom-spacing wica-visible}}}" style="width: {{#if: {{{width|}}} |{{{width|400px}}} | {{{3|400px}}} }}; max-width: 100%;">
<div style="background:#686868; padding:0px 10px 2px; border-radius: 10px 10px 0px 0px; border: 2px solid #686868;">
<div style="background:#686868; padding:0px 10px 2px; border-radius: 10px 10px 0px 0px; border: 2px solid #686868;">
<span style="background-color: #ffffff; padding: 1px; border-radius: 5px; float: right; margin-left: 10px;">&nbsp;{{IconBook}}&nbsp;</span><span style="color:#FFFFFF">'''<translate><!--T:1--> Question:</translate>''' {{{header|}}}{{{1|}}}</span>  
<span style="background-color: #ffffff; padding: 1px; border-radius: 5px; float: right; margin-left: 10px;">&nbsp;{{IconBook}}&nbsp;</span><span style="color:#FFFFFF">'''<translate><!--T:1--> Question:</translate>''' {{{header|}}}{{{1|}}}</span>  
Line 22: Line 8:
{{#if: {{{id|}}} |<div style="float: none; font-size: 80%; text-align: right;">[<nowiki></nowiki>[[:#{{{id}}}|{{{id}}}{{#if: {{{extid|}}}|&nbsp;/&nbsp;{{{extid}}}|<nowiki></nowiki>|}}]]<nowiki></nowiki>]</div>|}}
{{#if: {{{id|}}} |<div style="float: none; font-size: 80%; text-align: right;">[<nowiki></nowiki>[[:#{{{id}}}|{{{id}}}{{#if: {{{extid|}}}|&nbsp;/&nbsp;{{{extid}}}|<nowiki></nowiki>|}}]]<nowiki></nowiki>]</div>|}}
</div>
</div>
</div>
</div><noinclude><languages />
{{Breadcrumbs
|link1={{EditorManualLink}}
}}
== Description ==
Create a FAQ box with header and body. If a clarification id is provided, it will be displayed in the bottom right corner in brackets. The same id can be used as an anchor for a link. An additional external id (ext id) can be also provided to refer to the CAR, for example in the same generated link. It uses default values for layout that can be overridden (classes and width).
 
== Params ==
* <code>header</code> or 1st (mandatory): Content displayed in the box header
* <code>body</code> or 2nd (mandatory): Content displayed in the box body
* <code>id</code> (optional): Clarification id shown on bottom right corner as a link in brackets. Only shown if provided.
* <code>extid</code> (optional): Additional clarification id (with CAR.XXX format) shown on bottom right corner as part of the link generated for param id. Only shown if provided.
* <code>width</code> or 3rd (optional + default): Box witdh. Default value = <code>400px</code>. When device is smaller, then width will be set to 100% of space.
* <code>class</code> (optional + default): Wrapper div class string for box layout and separation, Default value = "wica-top-spacing wica-bottom-spacing wica-visible"
 
== Examples ==
{| class="wikitable light"
! Code || Description
|-
! <code><nowiki>{{FAQ|header=What if...?|body=If..., then...}}</nowiki></code> || FAQ box with specified question and answer
|-
| colspan="2" | {{FAQ|header=What if...?|body=If..., then...}}
|}
{{#switch: {{PAGELANGUAGE}}
| en = [[Category:Translatable_templates]]
|
}}</noinclude>

Revision as of 18:42, 8 November 2022

 Official clarification from the publisher Question:

Answer:

Description

Create a FAQ box with header and body. If a clarification id is provided, it will be displayed in the bottom right corner in brackets. The same id can be used as an anchor for a link. An additional external id (ext id) can be also provided to refer to the CAR, for example in the same generated link. It uses default values for layout that can be overridden (classes and width).

Params

  • header or 1st (mandatory): Content displayed in the box header
  • body or 2nd (mandatory): Content displayed in the box body
  • id (optional): Clarification id shown on bottom right corner as a link in brackets. Only shown if provided.
  • extid (optional): Additional clarification id (with CAR.XXX format) shown on bottom right corner as part of the link generated for param id. Only shown if provided.
  • width or 3rd (optional + default): Box witdh. Default value = 400px. When device is smaller, then width will be set to 100% of space.
  • class (optional + default): Wrapper div class string for box layout and separation, Default value = "wica-top-spacing wica-bottom-spacing wica-visible"

Examples

Code Description
{{FAQ|header=What if...?|body=If..., then...}} FAQ box with specified question and answer

 Official clarification from the publisher Question:

Answer: