Template:Nav: Difference between revisions
From xat wiki
(Created page with "<noinclude> The purpose of this template is to provide an easy and consistent set of navigation links on top of articles. Attributes: *'''border''' - change the colour of the...") |
No edit summary |
||
Line 11: | Line 11: | ||
For examples, see [[Xatwiki:Usergroups/nav]] | For examples, see [[Xatwiki:Usergroups/nav]] | ||
Important: | |||
Unless you really need to translate link names, it is advised to create a subarticle for your navigation, e.g [[Xatwiki:Usergroups/nav]], where "nav" is where we store the navigation links. Doing that, we can simply include the predefined navigation on the first line of an article - '''<nowiki>{{:Xatwiki:Usergroups/nav}}</nowiki>''' | |||
</noinclude><includeonly><div style="display:inline-table; width:100%"><div class="nodecoration" style="display:table; border-bottom:1px solid {{{border|#99bfff}}}; margin:0 auto"> | </noinclude><includeonly><div style="display:inline-table; width:100%"><div class="nodecoration" style="display:table; border-bottom:1px solid {{{border|#99bfff}}}; margin:0 auto"> | ||
{{{n1|<div style="float: left; margin:10px 5px 0 5px; line-height:25px; border: 1px solid {{{border|#99bfff}}}; border-bottom:0; background: {{{bg|#c9ddff}}}">[[{{{link1}}}|<span style="color: {{{color|black}}}; padding: 5px 10px">{{{name1}}}</span>]]</div>}}}<!-- | {{{n1|<div style="float: left; margin:10px 5px 0 5px; line-height:25px; border: 1px solid {{{border|#99bfff}}}; border-bottom:0; background: {{{bg|#c9ddff}}}">[[{{{link1}}}|<span style="color: {{{color|black}}}; padding: 5px 10px">{{{name1}}}</span>]]</div>}}}<!-- |
Revision as of 13:49, 14 July 2015
The purpose of this template is to provide an easy and consistent set of navigation links on top of articles.
Attributes:
- border - change the colour of the border of your navigation links (optional)
- bg - change the background of navigation links (optional)
- color - change the colour of navigation links (optional)
- name1 to name 10 - there can be a total of 10 navigation links
- link1 to link 10 - each link number corresponds to the number of name attribute
- n1 - n10 - to disable navigation links you're not using, e.g. to disable 2 and use 8, insert |n9= and n10= attributes to the bottom of the template.
For examples, see Xatwiki:Usergroups/nav
Important: Unless you really need to translate link names, it is advised to create a subarticle for your navigation, e.g Xatwiki:Usergroups/nav, where "nav" is where we store the navigation links. Doing that, we can simply include the predefined navigation on the first line of an article - {{:Xatwiki:Usergroups/nav}}