Difference between revisions of "Template:Navbox/old/doc"
< Template:Navbox | old
Jump to navigation
Jump to search
MyraMidnight (talk | contribs) m (MyraMidnight moved page Template:Navbox/doc to Template:Navbox/old/doc without leaving a redirect) |
MyraMidnight (talk | contribs) m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[category:Templates]] | [[category:Templates]] | ||
− | + | {{Ambox|type=content|text=Overhaul of the navigation tables is being made. The original template layout was moved here so it can still be used. Just replace what was <code><nowiki>{{Navbox}}</nowiki></code> with <code><nowiki>{{Navbox/old}}</nowiki></code> and things should work as they used to. But please try to help converting old navigation tables to the new layout, it is basically just a copy-paste }} | |
===How to use this Template=== | ===How to use this Template=== | ||
Fill it with the following info | Fill it with the following info | ||
Line 14: | Line 14: | ||
!style=width:200px|Template !!style=width:300px|Code !!Description | !style=width:200px|Template !!style=width:300px|Code !!Description | ||
|- | |- | ||
− | |'''[[Template:Navbox|Navbox]]''' | + | |'''[[Template:Navbox/old|Navbox/old]]''' |
− | |<code><nowiki>{{Navbox|title=|template=|groups=|footer=}}</nowiki></code> ||Adds the frame for the navigation table | + | |<code><nowiki>{{Navbox/old|title=|template=|groups=|footer=}}</nowiki></code> ||Adds the frame for the navigation table |
*"<code><nowiki>title=</nowiki></code>" adds the first header | *"<code><nowiki>title=</nowiki></code>" adds the first header | ||
*"<code><nowiki>template=</nowiki></code>" Name of the template, case sensitive! (skip the "{{monospace|Template:}}" part) | *"<code><nowiki>template=</nowiki></code>" Name of the template, case sensitive! (skip the "{{monospace|Template:}}" part) | ||
Line 32: | Line 32: | ||
====Example==== | ====Example==== | ||
<pre style="margin-left:40px;"> | <pre style="margin-left:40px;"> | ||
− | {{Navbox|title=Navigation Table |template=Navbox|groups= | + | {{Navbox/old|title=Navigation Table |template=Navbox|groups= |
{{Navbox-odd|group=Interesting links|links=[[Template:Navbox|]]}} | {{Navbox-odd|group=Interesting links|links=[[Template:Navbox|]]}} | ||
{{Navbox-header|title=Filler section}} | {{Navbox-header|title=Filler section}} |
Latest revision as of 16:40, 3 May 2017
How to use this Template[edit]
Fill it with the following info
title=
Title of navigationgroups=
use the{{Navbox-odd}}
and{{Navbox-even}}
templates to create rows between the title and footerfooter=
Add extra links to other relative pages
[edit]
A few templates have been created, which when used together become a pretty neat looking navigation table. The WikiWriter is in charge of template making, but I thought I would add this to explain how they are created in case of editing.
Template | Code | Description |
---|---|---|
Navbox/old | {{Navbox/old|title=|template=|groups=|footer=}} |
Adds the frame for the navigation table
|
templates used in Navbox "groups=" area | ||
Navbox-odd and Navbox-even | {{Navbox-odd|group=|links=}} |
Use these in the "groups= " area of the Navbox templateAdds the groups and their links. The only difference between them is the background color behind the links (odd is white, even is gray). |
Navbox-header | {{Navbox-header|title=}} |
Use these also in the "groups= " area, to create new sections.
|
Example[edit]
{{Navbox/old|title=Navigation Table |template=Navbox|groups= {{Navbox-odd|group=Interesting links|links=[[Template:Navbox|]]}} {{Navbox-header|title=Filler section}} {{Navbox-odd|group=Group 1|links=[[Template:Navbox-odd|]] • [[Template:Navbox-even|]]}} {{Navbox-even|group=Group 2|links=[[Template:Navbox-header|]]}} |footer=See Also}}
Adding extra columns and cells[edit]
By default each row is just one group, but since this is still a table you can add columns and such. But this is a bit more complicated.
- When adding extra cells, it follows the normal template system, but you need to write
{{!}}
instead of normal|
vertical bars, else you break the template - You need to add
colspan=
to every Navbox-odd and Template:Navbox-even template if you decide add extra columns anywhere. This stretches out the "links" cell. - You need to add
class=navbox-group
and
class=navbox-odd
(orclass=navbox-even
) to the cells you have manually added, so the CSS can color it like the rest of the table.
- Here I add extra two cells to a row, a group and links
{{Navbox-odd|links=
!class="navbox-group"{{!}}Group title
{{!}}class="navbox-odd"{{!}}[[Links]]}}
- Here I add extra colspan to stretch the next row's link cell
{{Navbox-odd|colspan=3|links=}}