Template:Nav/doc: Difference between revisions
m →Section: class example |
|||
| (One intermediate revision by one other user not shown) | |||
| Line 5: | Line 5: | ||
===Header=== | ===Header=== | ||
A header call to this template must be the first usage of this template. | A header call to this template must be the first usage of this template. | ||
<pre>{{nav|header|DQI| | <pre>{{nav|header|DQI|{{DQ}}|title=Ninjas|class=navMainSeries}}</pre> | ||
*header: A required parameter which marks this as the start of a navigation bar. This parameter must be the first parameter. It does not take a value. | *header: A required parameter which marks this as the start of a navigation bar. This parameter must be the first parameter. It does not take a value. | ||
*template: A required parameter specifying the name of the template containing the nav template calls. This parameter is a value only. The parameter must be the second parameter. It is used in the [[Template:tnav|tnav]] template in order to provide easy access to editing and discussion of the parent template. | *template: A required parameter specifying the name of the template containing the nav template calls. This parameter is a value only. The parameter must be the second parameter. It is used in the [[Template:tnav|tnav]] template in order to provide easy access to editing and discussion of the parent template. | ||
| Line 32: | Line 32: | ||
The show/hide functionality is added automatically to all navigation bars via javascript. No user input is necessary. The [[Template:tnav|tnav template]] is used to provide easy access to editing/discussion links. | The show/hide functionality is added automatically to all navigation bars via javascript. No user input is necessary. The [[Template:tnav|tnav template]] is used to provide easy access to editing/discussion links. | ||
==Example== | ==Example== | ||
===Sample=== | ===Sample=== | ||
{{nav|header|DQI|Dragon Quest}} | {{nav|header|DQI|Dragon Quest|title=''Dragon Quest''}} | ||
{{nav|section|Characters| | {{nav|section|Characters| | ||
* [[Hero (Dragon Quest | * [[Hero (Dragon Quest)|Hero]] | ||
* [[ | * [[Erdrick]] | ||
}} | }} | ||
{{nav|section|Locations| | {{nav|section|Locations| | ||
* [[Alefgard]] | * [[Alefgard]] | ||
* [[Brecconary]] | * [[Tantegel|Brecconary]] | ||
* [[ | * [[Erdrick's Cave]] | ||
* [[ | * [[Sanctum]] | ||
* [[ | * [[Quagmire Cave]] | ||
* [[Tantegel]] | * [[Tantegel]] | ||
}} | }} | ||
{{nav|footer}} | {{nav|footer}} | ||
===Code=== | ===Code=== | ||
<pre> | <pre> | ||
{{nav|header|DQI|Dragon Quest}} | {{nav|header|DQI|Dragon Quest|title=''Dragon Quest''}} | ||
{{nav|section|Characters| | {{nav|section|Characters| | ||
* [[Hero (Dragon Quest | * [[Hero (Dragon Quest)|Hero]] | ||
* [[ | * [[Erdrick]] | ||
}} | }} | ||
{{nav|section|Locations| | {{nav|section|Locations| | ||
* [[Alefgard]] | * [[Alefgard]] | ||
* [[Brecconary]] | * [[Tantegel|Brecconary]] | ||
* [[ | * [[Erdrick's Cave]] | ||
* [[ | * [[Sanctum]] | ||
* [[ | * [[Quagmire Cave]] | ||
* [[Tantegel]] | * [[Tantegel]] | ||
}} | }} | ||
{{nav|footer}} | {{nav|footer}} | ||
</pre> | </pre> | ||