Template:Helpnav: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(Created page with "<includeonly><div id="tech" > {| |style="valign:middle;width:55px"|50px|link=Tardis:Help |style="padding-left:10px"|''' {{#ifeq:{{{p| }}}| | |<div style="text-transform:uppercase;letter-spacing:4px;text-align:left;padding:3px;">[[Help:{{{p| }}}|{{{p| }}}]]</div>}} {{#dpl:|mode=userformat|category={{{c}}}|nottitlematch={{{p}}}|format=,,%TITLE% →\n}}{{#ifeq:{{PAGENAME}}|{{{p}}}| |'''{{PAGENAME}}'''}}{{#if:{{{you may|}}}| <br><hr>''You may...")
Tags: Mobile edit Mobile web edit
 
No edit summary
Tags: Mobile edit Mobile web edit
Line 1: Line 1:
<includeonly><div id="tech" >
<includeonly><div id="tech" >
{|
{|
|style="valign:middle;width:55px"|[[File:Book.png|50px|link=Tardis:Help]]
|style="valign:middle;width:55px"|[[File:Tardis-trans.png|50px|link=Tardis:Help]]
|style="padding-left:10px"|''' {{#ifeq:{{{p| }}}| | |<div style="text-transform:uppercase;letter-spacing:4px;text-align:left;padding:3px;">[[Help:{{{p| }}}|{{{p| }}}]]</div>}}
|style="padding-left:10px"|''' {{#ifeq:{{{p| }}}| | |<div style="text-transform:uppercase;letter-spacing:4px;text-align:left;padding:3px;">[[Help:{{{p| }}}|{{{p| }}}]]</div>}}
{{#dpl:|mode=userformat|category={{{c}}}|nottitlematch={{{p}}}|format=,,[[%PAGE%|%TITLE%]] &rarr;\n}}{{#ifeq:{{PAGENAME}}|{{{p}}}| |'''{{PAGENAME}}'''}}{{#if:{{{you may|}}}|
{{#dpl:|mode=userformat|category={{{c}}}|nottitlematch={{{p}}}|format=,,[[%PAGE%|%TITLE%]] &rarr;\n}}{{#ifeq:{{PAGENAME}}|{{{p}}}| |'''{{PAGENAME}}'''}}{{#if:{{{you may|}}}|

Revision as of 09:43, 27 February 2024

Instructions for {{Helpnav}}
{{helpnav}}, derived from {{mosnav}}, is a template that puts a navigation strip at the top of a page. It should be used only on help and support pages; hence the name.

Usage

To use, follow this simple pattern:

{{helpnav|p=parent chapter name|c=category name}}

Often enough, but not always, p and c have the same value, as can be seen for {{mosnav}} at T:COMMA. Both p and c must be defined for the template to work properly.

The template will produce a navigation scheme which automatically includes all pages in the category specified.

(Policies and support pages marked outdated are excluded from the output.)

Optional feature

Sometimes, certain policies or help pages will have relevance to other parent chapters. In this case you can add the variable you may= to suggest links to other chapters. A good example of this usage for {{mosnav}} can be found at Tardis:Naming conventions. Note that this {{{you may}}} is a little different from the template {{you may}} in that it is entirely free-form. Since the cases where you'd need to employ the variable you may are relatively rare, it was important to give maximum flexibility. The downside is that you have to remember to add linking brackets, like this:

{{helpnav|p=parent|c=category|you may=[[this page]] or [[that page]]}}

Historical note

{{mosnav}}, this template's "parent", was entirely redesigned and automated at 01:47, February 18, 2013 (UTC). Prior to this date, it was necessary to add each and every page to the template by hand. These days, however, the only things this template requires are values for p and c.

Thanks

The original template's name and earliest function owed a debt to memoryalpha:template:mos nav. However, its code barely resembles that MemAlpha template much anymore. Instead, we owe a debt of gratitude here to Tardis bureaucrat User:CzechOut, who wrote the original template.