Template:Navbox: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
m (table style hook. not documenting it because I don't want it to be overused.)
mNo edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude><includeonly>{| class="navbox" style="{{{style|}}}"
<onlyinclude><includeonly>{{#vardefine:navbox-hide|{{#switch:{{lc:{{{hide|}}}}}
! class="title" | {{{1|}}}<span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible">[hide]</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display: none;">[show]</span>
| hide | true | yes | y = hide | show | false | no | n = show
|-
| {{#ifexpr: {{++|navbox-ctr}} > 3
|<div class="_toggle_initshow _toggle toggle-visible">
  | hide | show }}}}}}{{Box|class=navbox|style={{{style|}}}|title={{{1|}}}|hide={{#var:navbox-hide}}|edit={{{edit|{{#if:{{{1|}}}|Template:{{{1}}}}}}}}}}
{|</includeonly></onlyinclude>
{|</includeonly></onlyinclude>


Line 11: Line 11:
This template is used as a composite of several subtemplates. Start with the code:
This template is used as a composite of several subtemplates. Start with the code:
{{Float|left|<pre>
{{Float|left|<pre>
{{Navbox|title}}
{{Navbox|edit{{=}}|hide{{=}}|title}}
{{Navbox/Header|header}}
{{Navbox/Header|header}}
{{Navbox/Row|section|content}}
{{Navbox/Row|section|content}}
{{Navbox/Bottom}}
{{Navbox/Bottom}}
</pre>}}
</pre>}}
{{Usage/Param|edit|The name of the navbox template. Creates a link to edit that template.|optional}}
{{Usage/Param|hide|Navboxes are hidden by default if there are three or more above them. To override this, set hide{{=}}true or hide{{=}}false.|optional}}
{{Usage/Param|title|The title that appears at the top of the navbox.}}
{{Usage/Param|title|The title that appears at the top of the navbox.}}
{{Usage/Param|header|A header inside the navbox, spanning across the width.}}
{{Usage/Param|header|A header inside the navbox, spanning across the width.}}
Line 22: Line 24:
{{Clear|left}}
{{Clear|left}}
<code><nowiki>{{Navbox}}</nowiki></code> and <code><nowiki>{{Navbox/Bottom}}</nowiki></code> are required. Between them, place any number of <code><nowiki>{{Navbox/Header}}</nowiki></code>s and <code><nowiki>{{Navbox/Row}}</nowiki></code>s in any order.
<code><nowiki>{{Navbox}}</nowiki></code> and <code><nowiki>{{Navbox/Bottom}}</nowiki></code> are required. Between them, place any number of <code><nowiki>{{Navbox/Header}}</nowiki></code>s and <code><nowiki>{{Navbox/Row}}</nowiki></code>s in any order.
Any Navbox after the third one on a page is hidden by default, but they can be force to be shown or hidden by specifying "hide=false" or "hide=true", respectively.




{{Cat|Formatting Templates}}
{{Cat|Formatting Templates}}
{{Cat|Box Templates
{{Cat|Navbox Templates}}
{{Cat|Navbox Templates}}

Latest revision as of 02:16, August 11, 2014


Purpose

This meta-template is used to more easily create navigation footers.

Usage

This template is used as a composite of several subtemplates. Start with the code:

{{Navbox|edit{{=}}|hide{{=}}|title}}
{{Navbox/Header|header}}
{{Navbox/Row|section|content}}
{{Navbox/Bottom}}
  • edit — The name of the navbox template. Creates a link to edit that template. (Optional.)
  • hide — Navboxes are hidden by default if there are three or more above them. To override this, set hide=true or hide=false. (Optional.)
  • title — The title that appears at the top of the navbox.
  • header — A header inside the navbox, spanning across the width.
  • section — A label for the section/row. (Optional.)
  • content — The content of the row, usually a list of links.

{{Navbox}} and {{Navbox/Bottom}} are required. Between them, place any number of {{Navbox/Header}}s and {{Navbox/Row}}s in any order.

Any Navbox after the third one on a page is hidden by default, but they can be force to be shown or hidden by specifying "hide=false" or "hide=true", respectively. {{Cat|Box Templates