Difference between revisions of "Template:NavHeader"

From PC-BSD Wiki
Jump to: navigation, search
(There may be some weirdness that causes this not to work as perfectly as I'd wish, but I think the new pagename stuff is accurate.)
Line 6: Line 6:
 
|class="navright" style="border-bottom: #BEBEBE solid 2px; width: 128px;"|{{NavHeaderRight|{{{back}}}{{putLang}}|{{{forward}}}{{putLang}}|{{#if:{{{l7dBack|}}}|{{{l7dBack}}}|{{{back}}}}}|{{#if:{{{l7dForward|}}}|{{{l7dForward}}}|{{{forward}}}}}}} <!-- Always: 'back link', 'forward link', localized 'back link', localized 'forward link' -->
 
|class="navright" style="border-bottom: #BEBEBE solid 2px; width: 128px;"|{{NavHeaderRight|{{{back}}}{{putLang}}|{{{forward}}}{{putLang}}|{{#if:{{{l7dBack|}}}|{{{l7dBack}}}|{{{back}}}}}|{{#if:{{{l7dForward|}}}|{{{l7dForward}}}|{{{forward}}}}}}} <!-- Always: 'back link', 'forward link', localized 'back link', localized 'forward link' -->
 
|-
 
|-
|style="border-bottom: #aaaaaa solid 1px; height: 40px;" colspan=5|<span target="{{PAGENAME}}"; id="{{PAGENAME}}"; style="margin-left:0; margin-right:0; width:100%; font-size: 200%; line-height: 1.2em; margin-bottom: 0em;">{{#titleparts: {{{custompagename|{{PAGENAME}}}}}|1}}</span>
+
|style="border-bottom: #aaaaaa solid 1px; height: 40px;" colspan=5|<span target="{{PAGENAME}}"; id="{{PAGENAME}}"; style="margin-left:0; margin-right:0; width:100%; font-size: 200%; line-height: 1.2em; margin-bottom: 0em;">{{#if: {{getLang}}|{{:Translations:{{PAGENAME}}/Page display title/{{getLang}}}}|{{#titleparts: {{{custompagename|{{PAGENAME}}}}}|1}}}}</span>
 
|}
 
|}
 
{| class="noprint" align="left" style="margin-left:-7px; margin-right:20px; margin-top:2px; margin-bottom:1px"
 
{| class="noprint" align="left" style="margin-left:-7px; margin-right:20px; margin-top:2px; margin-bottom:1px"
Line 13: Line 13:
 
|__FORCETOC__
 
|__FORCETOC__
 
| __TOC__  
 
| __TOC__  
|}<br><noinclude>
+
|}<br><noinclude><!-- {{#if: {{getLang}}|{{:Translations:{{PAGENAME}}/Page display title/{{getLang}}}}|{{#titleparts: {{{custompagename|{{PAGENAME}}}}}|1}}}} -->
 
__NOEDITSECTION__
 
__NOEDITSECTION__
 
=== Description ===
 
=== Description ===

Revision as of 02:30, 31 August 2013

Contents


Description

This assumes local links and greatly simplifies the process of adding or editing the navigation header for handbook pages. As you can see from the above, the navigation header overlays the page name, while a duplicate page name is placed below. The contents box is forced to appear in all pages that contain at least one header and is placed to the left beneath the line of the page name. An alternative page name is an option with the custompagename variable assignment. The home/index link should be modified within the Template:NavHeaderMiddle itself, while below may be pasted into a page with minor modifications to define what will become each link and the text for each link's alternate label. Missing or malformed link info defaults to a Navigation Header error page while properly formed but links to missing pages are added to the Special:wanted pages list. Text ought to be formatted with desired capitalization.

Usage

{{NavHeader|back=<name of the previous page>|forward=<name of the next page>|l7dBack=<localized name of the previous page>|l7dForward=<localized name of the next page>|custompagename=<custom page name>}}