Template:BubbleNav: Difference between revisions

From Red Faction Wiki
mNo edit summary
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><div class="bubble-container">
<includeonly><div class="bubble-container" id="{{#switch: {{{2}}}|yes = bubble-nodivider|no =|}}">
{| class="bubble-table"
<li class="mw-collapsible {{#switch: {{{3}}}|yes = mw-collapsed|no =}}" style="list-style: none;">{{BubbleNav/data|{{{1|}}}|data=title}}
|{{{title}}}
<ul class="mw-collapsible-content">{{BubbleNav/data|{{{1|}}}|data=links}}
|-
</ul>
|class="bubble-linkrow"|{{{links}}}
</li>
|}
</div>
</div></includeonly><noinclude>
</includeonly><noinclude>
<pre>
:To view, add and edit navigation presets, see [[Template:BubbleNav/data]].
{{BubbleNav
<templatedata>
|title =
{
|links =
"params": {
}}
"1": {
</pre>
"label": "Preset",
 
"description": "The preset that the navigation will use. This parameter grabs the presets from the Template:BubbleNav/data page.",
'''Guide to each parameter:''' View [[Template:Bubble]] for more information on how to use.
"example": "RFGCharacters",
<pre>
"type": "string",
{{BubbleNav
"required": true
|title = A bubble template is used here. ONLY use the types "explore" and "none" -
},
 
"2": {
"explore" type:
"label": "No Divider",
Used on main game pages. For text, only put a link to the game.
"description": "Sets whether the template's bottom divider is disabled. Use \"yes\" to disable the divider, \"no\" to keep the divider enabled.",
 
"example": "yes",
"none" type:
"type": "string",
Used on individual pages. For example, it can be used as a title for a list of locations of a game. In this case, the text would be "Locations of [main game page link here]".
"suggestedvalues": [
 
"yes",
|links = One or more bubble templates can be used here. ONLY use the "link" type.
"no"
}}
],
</pre>
"default": "no"
 
},
"3": {
"label": "Collapsed",
"description": "Sets whether the template is collapsed by default. Use \"yes\" to set it to collapsed, \"no\" to open by default.",
"example": "yes",
"type": "string",
"suggestedvalues": [
"yes",
"no"
],
"default": "no"
}
},
"description": "Place at the top of pages to create a navigation bar for quick access to other pages.",
"paramOrder": [
"1",
"2",
"3"
],
"format": "inline",
"maps": {
"Test": {}
}
}
</templatedata>
<pre>{{BubbleNav|PRESET}}</pre>
'''Usage:'''
'''Usage:'''
<pre>
<pre>{{BubbleNav|RFGCharacters|no|no}}</pre>
{{BubbleNav
|title  =
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
|links  =
{{Bubble|link|[[RF:G Editing Main Page|Modding]]|Icon_RFG.png|RF:G Editing Main Page}}
{{Bubble|link|[[Red Faction: Guerrilla Campaign Guide|Campaign]]|Icon_RFGBadge1.png|Red Faction: Guerrilla Campaign Guide}}
{{Bubble|link|[[Red Faction: Guerrilla Multiplayer Guide|Multiplayer]]|Icon_RFGBadge2.png|Red Faction: Guerrilla Multiplayer Guide}}
{{Bubble|link|[[Wrecking Crew]]|Icon_RFGBadge3.png|Wrecking Crew}}
{{Bubble|link|[[Red Faction: Guerrilla Vehicles|Vehicles]]|Icon_RFGVehicle.png|Red Faction: Guerrilla Vehicles}}
{{Bubble|link|[[Red Faction: Guerrilla Locations|Locations]]|Icon_RFGSafehouse.png|Red Faction: Guerrilla Locations}}
}}
</pre>
 
'''Output:'''
'''Output:'''
{{BubbleNav
{{BubbleNav|RFGCharacters|no|no}}
|title  =
[[Category:Core Templates]]
{{Bubble|explore|[[Red Faction: Guerrilla]]|Icon_RFG.png|Red Faction: Guerrilla}}
|links  =
{{Bubble|link|[[RF:G Editing Main Page|Modding]]|Icon_RFG.png|RF:G Editing Main Page}}
{{Bubble|link|[[Red Faction: Guerrilla Campaign Guide|Campaign]]|Icon_RFGBadge1.png|Red Faction: Guerrilla Campaign Guide}}
{{Bubble|link|[[Red Faction: Guerrilla Multiplayer Guide|Multiplayer]]|Icon_RFGBadge2.png|Red Faction: Guerrilla Multiplayer Guide}}
{{Bubble|link|[[Wrecking Crew]]|Icon_RFGBadge3.png|Wrecking Crew}}
{{Bubble|link|[[Red Faction: Guerrilla Vehicles|Vehicles]]|Icon_RFGVehicle.png|Red Faction: Guerrilla Vehicles}}
{{Bubble|link|[[Red Faction: Guerrilla Locations|Locations]]|Icon_RFGSafehouse.png|Red Faction: Guerrilla Locations}}
}}
</noinclude>
</noinclude>

Latest revision as of 03:39, 2 March 2024

To view, add and edit navigation presets, see Template:BubbleNav/data.

Place at the top of pages to create a navigation bar for quick access to other pages.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Preset1

The preset that the navigation will use. This parameter grabs the presets from the Template:BubbleNav/data page.

Example
RFGCharacters
Stringrequired
No Divider2

Sets whether the template's bottom divider is disabled. Use "yes" to disable the divider, "no" to keep the divider enabled.

Suggested values
yes no
Default
no
Example
yes
Stringoptional
Collapsed3

Sets whether the template is collapsed by default. Use "yes" to set it to collapsed, "no" to open by default.

Suggested values
yes no
Default
no
Example
yes
Stringoptional
{{BubbleNav|PRESET}}

Usage:

{{BubbleNav|RFGCharacters|no|no}}

Output: