Template:Navigation: Difference between revisions
Appearance
wikademia>Darklama m rm depricated stuff and align body to left |
wikademia>Darklama add optional navbar argument and add documentation |
||
| Line 1: | Line 1: | ||
<div class="NavFrame" style="clear:both;"> | <includeonly><!-- | ||
<div class="NavHead" style="{{{titlestyle|}}}">'''{{{title}}}'''</div> | --><div class="NavFrame" style="clear:both; {{{style|}}}"><!-- | ||
<div class="NavContent" style="margin:0.5em; font-size:0.9em; text-align:left; {{{ | --><div class="NavHead" style="{{{titlestyle|}}}"><!-- | ||
{{{body}}} {{{cat| | -->{{#ifeq:{{{navbar|}}}|yes|{{Tnavbar2|{{FULLPAGENAME}}|mini=1|style=position:absolute;width:auto;left:0.5em;}}}}<!-- | ||
<!--end_NavContent:--></div> | -->'''{{{title}}}'''</div><!-- | ||
<!---end_NavFrame:---></div><noinclude> | --><div class="NavContent" style="margin:0.5em; font-size:0.9em; text-align:left; {{{bodystyle|}}}"><!-- | ||
-->{{{body}}} {{{cat|{{{category|}}}}}}<!-- | |||
<!--end_NavContent:--></div><!-- | |||
<!---end_NavFrame:---></div></includeonly><noinclude> | |||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | |||
<code>{{[[Template:{{PAGENAME}}|{{PAGENAME}}]]}}</code> is a generic Navigational template. | |||
==Blank syntax (basic)== | |||
<pre>{{Navigation | |||
|title = | |||
|body = | |||
}} | |||
</pre> | |||
== Parameters == | |||
===Mandatory=== | |||
; ''title'' : Text that appears centered in the titlebar (the top bar). Usually this is the template's topic, i.e. a succinct description of the body contents. | |||
; ''body'' : The material contained by the template, usually a list or list of links. <!--Pipe character not the only way to separate links: "Use &#124; to separate links. It is not possible to directly include a pipe ("|") in the contents as this symbol is used to separate parameters. &#124; or {{tl|!}} can be used in the body to produce a pipe symbol."--> Format is inline. | |||
===Optional=== | |||
; ''navbar'' : Whether to include navigation links. Includes when set to true, otherwise does not. | |||
; ''style'' : Any CSS styling to apply to the whole navigation; | |||
; ''titlestyle'' : Any CSS styling to apply to the titlebar; usually a background color (i.e. <code>titlestyle = background:''color''</code>). | |||
; ''bodystyle'' : Any CSS styling to add to the body, e.g. "text-align:center;" to center the body's content in place of its default left alignment. | |||
; ''category'' : The category or categories to which a page transcluding the template will become a member. Place <code><nowiki><includeonly></nowiki></code> ...... <code><nowiki></includeonly></nowiki></code> either side of the category or categories to ensure the template itself isn't made a member. Use of this parameter is discouraged; when editing a page on which the template is transcluded, no mention of the category or categories added by this parameter is apparent. | |||
==Example== | |||
===Code=== | |||
<pre> | |||
{{Navigation | |||
|title = Countries of Central Asia | |||
|body = | |||
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan | |||
}} | |||
</pre> | |||
<pre> | |||
{{Navigation | |||
|navbar = yes | |||
|name = {{subst:PAGENAME}} | |||
|title = Countries of Central Asia | |||
|body = | |||
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan | |||
}} | |||
</pre> | |||
===Result=== | |||
{{msg:{{BASEPAGENAME}} | |||
|title = Countries of Central Asia | |||
|body = | |||
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan | |||
}} | |||
{{msg:{{BASEPAGENAME}} | |||
|navbar = yes | |||
|title = Countries of Central Asia | |||
|body = | |||
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan | |||
}} | |||
[[Category:Navigational templates]] | [[Category:Navigational templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 19:21, 16 May 2007
{{Navigation}} is a generic Navigational template.
Blank syntax (basic)
{{Navigation
|title =
|body =
}}
Parameters
Mandatory
- title
- Text that appears centered in the titlebar (the top bar). Usually this is the template's topic, i.e. a succinct description of the body contents.
- body
- The material contained by the template, usually a list or list of links. Format is inline.
Optional
- navbar
- Whether to include navigation links. Includes when set to true, otherwise does not.
- style
- Any CSS styling to apply to the whole navigation;
- titlestyle
- Any CSS styling to apply to the titlebar; usually a background color (i.e.
titlestyle = background:color).
- bodystyle
- Any CSS styling to add to the body, e.g. "text-align:center;" to center the body's content in place of its default left alignment.
- category
- The category or categories to which a page transcluding the template will become a member. Place
<includeonly>......</includeonly>either side of the category or categories to ensure the template itself isn't made a member. Use of this parameter is discouraged; when editing a page on which the template is transcluded, no mention of the category or categories added by this parameter is apparent.
Example
Code
{{Navigation
|title = Countries of Central Asia
|body =
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
}}
{{Navigation
|navbar = yes
|name = {{subst:PAGENAME}}
|title = Countries of Central Asia
|body =
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
}}
Result
Countries of Central Asia
Afghanistan · Kazakhstan · Kyrgyzstan · Mongolia · Russia · Tajikistan · Turkmenistan · Uzbekistan
Countries of Central Asia
Afghanistan · Kazakhstan · Kyrgyzstan · Mongolia · Russia · Tajikistan · Turkmenistan · Uzbekistan