Jump to content

Template:OOO-FAQ: Difference between revisions

From Out of Ore Wiki
mNo edit summary
m updated faq limit ( 10 visual & with source edit can add infinite)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>{{#invoke:OOOFAQ|render}}</includeonly><noinclude>
<div class="ooo-faq">
{{{content|}}}
</div>
</includeonly>


<noinclude>
= OOO FAQ Template =


= OOO FAQ Template =
Creates collapsible FAQ sections styled for the Out of Ore Wiki.
Creates collapsible FAQ sections styled for the Out of Ore Wiki.
----


== Usage ==
== Usage ==
Copy and paste:


<pre>
<pre>
{{OOO-FAQ
{{OOO-FAQ
| content =
| question1 = How does power work?
| answer1  = Power is generated by generators and distributed through cables.


<div class="mw-collapsible mw-collapsed ooo-faq__item">
| question2 = Can conveyors merge?
<div class="ooo-faq__question">
| answer2  = Yes. Use splitters/junctions and plan throughput.
Your question here?
</div>
<div class="mw-collapsible-content ooo-faq__answer">
Your answer text here.
</div>
</div>


| question3 = Does multiplayer share power grids?
| answer3  = Yes, if the machines/cables are connected into the same network.
}}
}}
</pre>
</pre>


----
== Add more than 10 questions ==
The VisualEditor form shows 10 fields, but the template supports unlimited entries.
 
To add more:
# Click “Edit source” (or switch to wikitext/source mode).
# Add new pairs by continuing the numbering:
 
<pre>
| question11 = Your question
| answer11  = Your answer
 
| question12 = Your question
| answer12  = Your answer
</pre>
 
== Notes ==
* Use matching numbers: questionX with answerX.
* Answers can include wiki formatting, links, lists, and multiple paragraphs.
 
<templatedata>
{
  "description": "Creates collapsible FAQ sections (up to 10 fields in VisualEditor; unlimited in source mode).",
  "params": {
    "question1": { "label": "Question 1", "type": "string" },
    "answer1":  { "label": "Answer 1", "type": "content" },


== Example Preview ==
    "question2": { "label": "Question 2", "type": "string" },
    "answer2":  { "label": "Answer 2", "type": "content" },


{{OOO-FAQ
    "question3": { "label": "Question 3", "type": "string" },
| content =
    "answer3":  { "label": "Answer 3", "type": "content" },


<div class="mw-collapsible mw-collapsed ooo-faq__item">
    "question4": { "label": "Question 4", "type": "string" },
<div class="ooo-faq__question">
    "answer4":  { "label": "Answer 4", "type": "content" },
How does power work?
</div>
<div class="mw-collapsible-content ooo-faq__answer">
Power is generated by generators and distributed through cables.
</div>
</div>


<div class="mw-collapsible mw-collapsed ooo-faq__item">
    "question5": { "label": "Question 5", "type": "string" },
<div class="ooo-faq__question">
    "answer5":  { "label": "Answer 5", "type": "content" },
Does multiplayer share power grids?
</div>
<div class="mw-collapsible-content ooo-faq__answer">
Yes. Connected systems share the same power network.
</div>
</div>


}}
    "question6": { "label": "Question 6", "type": "string" },
    "answer6":  { "label": "Answer 6", "type": "content" },


----
    "question7": { "label": "Question 7", "type": "string" },
    "answer7":  { "label": "Answer 7", "type": "content" },


== Notes ==
    "question8": { "label": "Question 8", "type": "string" },
    "answer8":  { "label": "Answer 8", "type": "content" },


* Uses MediaWiki native collapsible system 
    "question9": { "label": "Question 9", "type": "string" },
* No JavaScript required 
    "answer9":  { "label": "Answer 9", "type": "content" },
* Works in light and dark themes 
* Multiple FAQ items supported 
* Styling handled globally via Common.css 


<templatedata>
    "question10": { "label": "Question 10", "type": "string" },
{
    "answer10":   { "label": "Answer 10", "type": "content" }
   "description": "Creates collapsible FAQ sections styled for the Out of Ore Wiki.",
  },
   "params": {
   "paramOrder": [
     "content": {
    "question1","answer1",
      "label": "FAQ Content",
    "question2","answer2",
      "description": "Insert one or more collapsible FAQ items using mw-collapsible structure.",
    "question3","answer3",
      "type": "content",
     "question4","answer4",
      "required": true
    "question5","answer5",
     }
    "question6","answer6",
   }
    "question7","answer7",
    "question8","answer8",
    "question9","answer9",
     "question10","answer10"
   ]
}
}
</templatedata></noinclude>
</templatedata>
 
</noinclude>

Latest revision as of 21:55, 3 March 2026


OOO FAQ Template

Creates collapsible FAQ sections styled for the Out of Ore Wiki.

Usage

{{OOO-FAQ
| question1 = How does power work?
| answer1   = Power is generated by generators and distributed through cables.

| question2 = Can conveyors merge?
| answer2   = Yes. Use splitters/junctions and plan throughput.

| question3 = Does multiplayer share power grids?
| answer3   = Yes, if the machines/cables are connected into the same network.
}}

Add more than 10 questions

The VisualEditor form shows 10 fields, but the template supports unlimited entries.

To add more:

  1. Click “Edit source” (or switch to wikitext/source mode).
  2. Add new pairs by continuing the numbering:
| question11 = Your question
| answer11   = Your answer

| question12 = Your question
| answer12   = Your answer

Notes

  • Use matching numbers: questionX with answerX.
  • Answers can include wiki formatting, links, lists, and multiple paragraphs.

Creates collapsible FAQ sections (up to 10 fields in VisualEditor; unlimited in source mode).

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Question 1question1

no description

Stringoptional
Answer 1answer1

no description

Contentoptional
Question 2question2

no description

Stringoptional
Answer 2answer2

no description

Contentoptional
Question 3question3

no description

Stringoptional
Answer 3answer3

no description

Contentoptional
Question 4question4

no description

Stringoptional
Answer 4answer4

no description

Contentoptional
Question 5question5

no description

Stringoptional
Answer 5answer5

no description

Contentoptional
Question 6question6

no description

Stringoptional
Answer 6answer6

no description

Contentoptional
Question 7question7

no description

Stringoptional
Answer 7answer7

no description

Contentoptional
Question 8question8

no description

Stringoptional
Answer 8answer8

no description

Contentoptional
Question 9question9

no description

Stringoptional
Answer 9answer9

no description

Contentoptional
Question 10question10

no description

Stringoptional
Answer 10answer10

no description

Contentoptional