Template:Navbox/doc: Difference between revisions

Initial creating, taken from RuneScape. Styling to be added soon
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{invokes|Navbox|category=No}}<!----Do not add this category to *every* navbox
{{invokes|Navbox|category=No}}<!----Do not add this category to *every* navbox
       added explicitly to {{Navbox}} at the end of documentation----->
       added explicitly to {{Navbox}} at the end of documentation----->
{{Underconstruction}}
==Usage==
==Usage==
This template can be used to make a standard navigation box. It is intended for use within another template that standardises the title and contents of the box (see [[Template:ShipNavBox]]). This template SHOULD NOT be used directly within articles, as it creates a maintenance burden to do so whenever the contents of the box have to be updated.
This template can be used to make a standard navigation box. It is intended for use within another template that standardises the title and contents of the box (see [[Template:ShipNavbox]]). This template SHOULD NOT be used directly within articles, as it creates a maintenance burden to do so whenever the contents of the box have to be updated.


The purpose of this template is to standardise the attributes of all navigation boxes, for example, their colours and other CSS attributes. The template is fairly simple, and could be extended to add other features in the future. Using this template allows changes to be implemented much quicker and easier than editing each template separately.
The purpose of this template is to standardise the attributes of all navigation boxes, for example, their colours and other CSS attributes. The template is fairly simple, and could be extended to add other features in the future. Using this template allows changes to be implemented much quicker and easier than editing each template separately.
Line 89: Line 88:
==Use of images==
==Use of images==
* The use of images in navboxes is permitted, but please resize the images to keep them small. Inventory-sized images (25-30 pixels) are recommended.
* The use of images in navboxes is permitted, but please resize the images to keep them small. Inventory-sized images (25-30 pixels) are recommended.
* Please use {{t|plink}} to create links with images. Use {{t|plink}} for any case where text is not desired after the link. It functions the same as {{t|plink}}, but it does not produce a wikilink in text. Use {{t|chatl}} to link chatheads. These templates create links for both the image and text (except for {{t|plink}}) using far less wikicode than the standard syntax.
* <nowiki>Please use {{t|plink}} to create links with images. Use {{t|plink}} for any case where text is not desired after the link. It functions the same as {{t|plink}}, but it does not produce a wikilink in text. Use {{t|chatl}} to link chatheads. These templates create links for both the image and text (except for {{t|plink}}) using far less wikicode than the standard syntax.</nowiki>


Link and file share the same name
Link and file share the same name
Line 139: Line 138:


==Categorising==
==Categorising==
Navboxes are very useful for transcluding categories onto a large number of pages that share both a trait and the navigation box. For example: [[Template:ShipNavBox]] transcludes [[:Category:Ships]] onto every page that uses it.
Navboxes are very useful for transcluding categories onto a large number of pages that share both a trait and the navigation box. For example: [[Template:ShipNavbox]] transcludes [[:Category:Ships]] onto every page that uses it.


There are 2 methods of categorising pages with navboxes:
There are 2 methods of categorising pages with navboxes:


The first way is with '''{{t|Ctg}}'''. This is the preferred method, and can be used in most cases. The rules and operations for the Category handler template are very simple; however, they are enough to produce the desired results on most pages.
The first way is with <nowiki>{{t|Ctg}}</nowiki>. This is the preferred method, and can be used in most cases. The rules and operations for the Category handler template are very simple; however, they are enough to produce the desired results on most pages.


Categorisation should only be used on a template for large-scale addition. It is unhelpful, for example, to use a rule that only applies to 1 page.
Categorisation should only be used on a template for large-scale addition. It is unhelpful, for example, to use a rule that only applies to 1 page.
Line 276: Line 275:
|title  = Plain navbox without Tnavbar
|title  = Plain navbox without Tnavbar
|style1  = text-align:center
|style1  = text-align:center
|group1  = [<small>[[Ships|show]]</small>]/[<small>[[Ships|hide]]</small>] links hidden (see Top-right corner).<br /><small>[[Ships|v]] {{*}} [[Ships|d]] {{*}} [[Ships|e]]</small> links also hidden (see Top-left corner). This is done by removing the ''name'' parameter.
|group1  = [<small>[[Ships|show]]</small>]/[<small>[[Ships|hide]]</small>] links hidden (see Top-right corner).<br /><small>[[Ships|v]] &middot; [[Ships|d]] &middot; [[Ships|e]]</small> links also hidden (see Top-left corner). This is done by removing the ''name'' parameter.
}}}}
}}}}
<pre>{{navbox
<pre>{{navbox