Template:Header Nav: Difference between revisions

Template page
w:c:strategywiki>Rocky
m (fix links)
w:c:strategywiki>Prod
(removing failsafes, the can have problems, better to show when things wrong, num fix didn't work properly)
Line 1: Line 1:
<includeonly><div style="clear: both; width: 100%; border: 1px solid #AAAAAA; -moz-border-radius-bottomleft: 10px; -moz-border-radius-bottomright: 10px; text-align: left; font-size: 0.9em;" {{#if:{{{onepage|}}}||class="NavFrame"}}>
<includeonly><div style="clear: both; width: 100%; border: 1px solid #AAAAAA; -moz-border-radius-bottomleft: 10px; -moz-border-radius-bottomright: 10px; text-align: left; font-size: 0.9em;" {{#if:{{{onepage|}}}||class="NavFrame"}}>
<p style="position: relative;" class="NavHead">{{#ifeq:{{FULLPAGENAME}}|{{{game|}}}|[[Image:000{{{num|0}}}.svg|This guide is at completion stage {{{num|0}}}]][[Category:Guides at completion stage {{{num|0}}}]]&nbsp;|[[Category:Sub-pages]]&nbsp;&nbsp;&nbsp;&nbsp;}}'''[[{{{game|{{NAMESPACE}}:{{BASEPAGENAME}}}}}]]''' {{#if:{{{onepage|}}}| |{{#if:{{{parent|}}}|<nowiki>|</nowiki> [[{{{parent}}}/Table of Contents|Table of Contents]] <nowiki>|</nowiki> [[{{{parent}}}/Walkthrough|Walkthrough]]|<nowiki>|</nowiki> [[{{{game|{{NAMESPACE}}:{{BASEPAGENAME}}}}}/Table of Contents|Table of Contents]] <nowiki>|</nowiki> [[{{{game|{{NAMESPACE}}:{{BASEPAGENAME}}}}}/Walkthrough|Walkthrough]]}}}} {{#if:{{{custom|}}}|<nowiki>|</nowiki> {{{custom}}} }}</p>
<p style="position: relative;" class="NavHead">{{#if:{{{num|}}}|[[Image:000{{{num}}}.svg|Completion stage {{{num}}}]][[Category:Guides at completion stage {{{num}}}]]&nbsp;|[[Category:Sub-pages]]&nbsp;&nbsp;&nbsp;&nbsp;}}'''[[{{{game}}}]]''' {{#if:{{{onepage|}}}| |{{#if:{{{parent|}}}|<nowiki>|</nowiki> [[{{{parent}}}/Table of Contents|Table of Contents]] <nowiki>|</nowiki> [[{{{parent}}}/Walkthrough|Walkthrough]]|<nowiki>|</nowiki> [[{{{game}}}/Table of Contents|Table of Contents]] <nowiki>|</nowiki> [[{{{game}}}/Walkthrough|Walkthrough]]}}}} {{#if:{{{custom|}}}|<nowiki>|</nowiki> {{{custom}}} }}</p>
<div class="NavContent" style="display: none;">
<div class="NavContent" style="display: none;">
<p style="color: #06033f; font-weight: normal; margin: 0; padding-top: .1em; padding-bottom: .1em; border-bottom: 1px solid #CCCCCC; font-size: 150%; padding-left: 5px; margin-bottom: .6em;">Table of Contents</p>
<p style="color: #06033f; font-weight: normal; margin: 0; padding-top: .1em; padding-bottom: .1em; border-bottom: 1px solid #CCCCCC; font-size: 150%; padding-left: 5px; margin-bottom: .6em;">Table of Contents</p>

Revision as of 20:06, 2 June 2007

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.

This template is used at the top of every guide page to ease navigation around guides. For simple games with only a single page guide, use {{Header Bar}} instead.

Usage

Add the template to a page like this:

{{Header Nav
|game=Game name
|num=Number from 0 to 5 (main guide page only)
|custom=custom non-hidden links (optional)
}}

This looks as follows when added to the guide without num:

{{Header Nav|game=The Legend of Zelda: Ocarina of Time}}

Usage of num

For more details on this topic, see StrategyWiki:Guide/Adding more information#Guide completion stages.

The num variable belongs only on the main page of guides to represent the overall completion level of the guide. It has a value between 0 and 5. This parameter will categorize the guide into one of the guide completion stage categories.

Usage of custom

To put custom links on every page in a guide, a Custom Nav page needs to be created (e.g. Chip's Challenge/Custom Nav), which will be included in the Header Nav for each page in that guide after the Walkthrough link but before any other custom links. This is the recommended way to include standard custom links on Header Navs in a guide, and apart from creating the Custom Nav page, no other modifications to the guide have to be made.

To add extra links to the Header Nav for a specific page, use the custom parameter for the Header Nav on that page. To make the look and feel standard, put a {{!}} between links. Example usage:

{{Header Nav
|game=The Legend of Zelda: Ocarina of Time
|custom=[[The Legend of Zelda: Ocarina of Time/Maps|Maps]] {{!}} [[The Legend of Zelda:Ocarina of Time/Controls|Controls]] 
}}

Example output: