Template:Footer Nav: Difference between revisions

Template page
w:c:strategywiki>DrBob
m (Updated)
m (Fixed: Next and prev links point to adjacent subpages)
 
(48 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<div style="clear: both; width: auto; margin-bottom: 1em; border: 1px solid #AAAAAA; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; text-align: center; font-size: 12px;" {{qif|test={{{toc|}}}|then=|else=class="NavFrame"}}>
<includeonly><div class="nav_box footer_nav mw-collapsible {{#ifeq:{{SUBPAGENAME}}|Walkthrough||mw-collapsed}} noprint"><span class="top_link">[[#top|Go to top]]</span><div class="mw-collapsible-header">{{#if:{{{customprev|}}}|← {{{customprev|}}} {{!}}&nbsp;}}← {{#if:{{{previmg|}}}|{{{previmg}}}&nbsp;}}{{#if:{{{prevpage|}}}|[[../{{{prevpage|}}}|{{{prevname|{{{prevpage|}}}}}}]]|[[{{{game|}}}]]}} {{!}} {{#if:{{{hereimg|}}}|{{{hereimg}}}&nbsp;}}{{{here|{{SUBPAGENAME}}}}} {{!}} {{#if:{{{nextimg|}}}|{{{nextimg}}}&nbsp;}}{{#if:{{{nextpage|}}}|[[../{{{nextpage}}}|{{{nextname|{{{nextpage}}}}}}]]|[[{{{game|}}}]]}} →{{#if:{{{customnext|}}}|&nbsp;{{!}} {{{customnext}}} →}}</div><div class="mw-collapsible-content"><p class="toc_heading">Table of Contents</p>{{:Table of Contents}}{{-}}</div></div></includeonly><noinclude>
<p style="position: relative; padding-left: 0.5%; padding-right: 0.5%;" {{qif|test={{{toc|}}}|then=|else=class="NavHead"}}>
{{Documentation}}
<span style="float: left; font-size: smaller;">[[{{FULLPAGENAME}}#outer|[go to top]]]</span>
{{High-risk}}
<div style="clear: both;">
{{qif|test={{{customback|}}}|then=<span style="border-right: 1px solid grey; padding-right: 5px; margin-right: 5px;">← {{{customback}}}</span>}}<span style="border-right: 1px solid grey; padding-right: 5px; margin-right: 5px;">← [[{{{game}}}{{qif|test={{{backpage|}}}|then=/{{{backpage}}}}}|{{{backname}}}]]</span>
<span style="padding-left: 5px; padding-right: 5px;">{{{here}}}</span>
<span style="border-left: 1px solid grey; padding-left: 5px; margin-left: 5px;">[[{{{game}}}{{qif|test={{{nextpage|}}}|then=/{{{nextpage}}}}}|{{{nextname}}}]] →</span>
{{qif|test={{{customnext|}}}|then=<span style="border-left: 1px solid grey; padding-left: 5px; margin-left: 5px;">{{{customnext}}} →</span> }}</div>
</p>
{{-}}
{{qif|test={{{toc|}}}|then=|else=<div class="NavContent" style="border-top: 1px solid #CCCCCC; padding: 5px;">
{{:{{{game}}}/Walkthrough Index}}
</div>}}</div><noinclude>
<pre><nowiki>{{Footer_Nav|game=Game|backpage=Previous Page|backname=label|here=This Page|nextpage=Next Page|nextname=label}}</nowiki></pre>


You can also use the custom parameters <code>customback=</code> and <code>customnext=</code> to add additional links to a direction.
[[Category:Templates]]</noinclude>
 
If you do not want/need the popdown table of contents, then add the variable toc=no(or any value, actually) to the template,which will remove the popdown and show/hide link:
 
without toc=no
{{Footer_Nav|game=Game|backpage=Previous Page|backname=label|here=This Page|nextpage=Next Page|nextname=label}}
 
with toc=no
{{Footer_Nav|game=Game|backpage=Previous Page|backname=label|here=This Page|nextpage=Next Page|nextname=label|toc=no}}
 
[[Category:Templates|F]]</noinclude>

Latest revision as of 20:06, 28 October 2023

This page has been transcluded from Template:Footer Nav/Documentation.


This template is used to display a "footer nav" at the bottom of a page, which contains links to the previous and next pages, as well as an expandable table of contents, which is usually hidden, but is shown by default for "Walkthrough" pages.

Usage[edit source]

{{Footer Nav
|game=Game name
|prevpage=Previous page name (do not include game name)
|prevname=Previous page label (optional)
|previmg=[[Image:sample.jpg]] (optional image to display with the "previous" link)
|here=This page label (optional; do not include game name)
|hereimg=[[Image:sample.jpg]] (optional image to display with the "here" label)
|nextpage=Next page name (do not include game name)
|nextname=Next page label (optional)
|nextimg=[[Image:sample.jpg]] (optional image to display with the "next" link)
|customprev=Additional link on the left (optional).
|customnext=Additional link on the right (optional).
}}

The prevname, here and nextname parameters are optional, and should only be passed if you want the previous/next links to have labels different from the page name (e.g. if the previous or next pages are sub-sub-pages), or if you want the current page label to be different from the current page's name.

You can also use the custom parameters customprev= and customnext= to add additional links to a direction.

Example[edit source]

Most commonly you will run into a basic Footer Nav with only the minimum requirements, such as the following:

{{Footer Nav|game=Super Metroid|prevpage=Controls|nextpage=Space Colony Ceres}}


High-risk
High-risk

This high-risk template or image has been protected indefinitely. It is widely used and is at significant risk of vandalism. If you would like to edit this page, bring it up on the talk page, contact a sysop, or bring it up on Discord. Protection is not an endorsement of the current version, which is inevitably the wrong version.