Jump to content

Template:Navigation: Difference between revisions

From IdeaWazaWiki
wikademia>Darklama
m minor fix
wikademia>Wikademia
m 19 revisions
 
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--><div class="NavFrame" style="clear:both; {{{style|}}}"><!--
--><div class="NavFrame {{#ifeq:{{{expand|{{{show|}}}}}}|yes|selected}}" style="clear:both; {{{style|}}}"><!--
--><div class="NavHead"  style="{{{titlestyle|}}}"><!--
--><div class="NavHead"  style="{{{titlestyle|}}}"><!--
-->{{#ifeq:{{{navbar|}}}|yes|{{Tnavbar2|{{PAGENAME}}|mini=1|style=position:absolute;width:auto;left:0.5em;}}}}<!--
-->{{#if:{{{name|}}}|{{Tnavbar2|{{{name}}}|mini=1|style=position:absolute;width:auto;left:0.5em;}}|<!--
-->{{#ifeq:{{{navbar|}}}|yes|{{Tnavbar2|{{{navtitle|{{PAGENAME}}}}}|mini=1|style=position:absolute;width:auto;left:0.5em;}}}}}}<!--
-->'''{{{title}}}'''</div><!--
-->'''{{{title}}}'''</div><!--
--><div class="NavContent" style="margin:0.5em; font-size:0.9em; text-align:left; {{{bodystyle|}}}"><!--
--><div class="NavContent" style="margin:0.5em; font-size:0.9em; text-align:left; {{{bodystyle|}}}">
-->{{{body}}} {{{cat|{{{category|}}}}}}<!--
{{{body|}}}
{{{cat|{{{category|}}}}}}
<!--end_NavContent:--></div><!--
<!--end_NavContent:--></div><!--
<!---end_NavFrame:---></div></includeonly><noinclude>
<!---end_NavFrame:---></div></includeonly><noinclude>
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<code>{&#123;[[Template:{{PAGENAME}}|{{PAGENAME}}]]&#125;}</code> is a generic Navigational template.
{{tlx|{{PAGENAME}}}} is a generic Navigational template.


==Blank syntax (basic)==
==Blank syntax (basic)==
Line 26: Line 28:


===Optional===
===Optional===
; ''navbar'' : Whether to include navigation links. Includes when set to true, otherwise does not.
; ''navbar'' : Whether to include navigation links. Includes when set to yes, otherwise does not.
 
; ''navtitle'' : What name to use for the navigation links. Defaults to the current page name.


; ''style'' : Any CSS styling to apply to the whole navigation;
; ''style'' : Any CSS styling to apply to the whole navigation;
Line 35: Line 39:


; ''category''  : The category or categories to which a page transcluding the template will become a member. Place <code><nowiki>&lt;includeonly&gt;</nowiki></code> ...... <code><nowiki>&lt;/includeonly&gt;</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.
; ''category''  : The category or categories to which a page transcluding the template will become a member. Place <code><nowiki>&lt;includeonly&gt;</nowiki></code> ...... <code><nowiki>&lt;/includeonly&gt;</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.
; ''show''' : Whether to expand the body by default. Expands when set to yes, otherwise not. In the example, below, the third box specifies "show = yes", forcing the third box to expand.


==Example==
==Example==
Line 42: Line 48:
{{Navigation
{{Navigation
|title = Countries of Central Asia
|title = Countries of Central Asia
|body  =
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
}}
 
{{Navigation
|navbar = yes
|title = Countries of Central Asia
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
}}
}}
</pre>


<pre>
{{Navigation
{{Navigation
|navbar = yes
|navbar = yes
|title = Countries of Central Asia
|title = Countries of Central Asia
|body  =
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
|show = yes
}}
}}
</pre>
</pre>
Line 59: Line 68:
{{msg:{{BASEPAGENAME}}
{{msg:{{BASEPAGENAME}}
|title = Countries of Central Asia
|title = Countries of Central Asia
|body  =
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
}}
}}


Line 66: Line 74:
|navbar = yes
|navbar = yes
|title = Countries of Central Asia
|title = Countries of Central Asia
|body  =
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
}}
 
{{Navigation
|navbar = yes
|title = Countries of Central Asia
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
|show = yes
}}
}}


[[Category:Navigational templates]]
[[Category:Navigational templates]]
</noinclude>
</noinclude>

Latest revision as of 11:23, 23 March 2009

{{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 yes, otherwise does not.
navtitle
What name to use for the navigation links. Defaults to the current page name.
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.
show'
Whether to expand the body by default. Expands when set to yes, otherwise not. In the example, below, the third box specifies "show = yes", forcing the third box to expand.

Example

Code

{{Navigation
|title = Countries of Central Asia
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
}}

{{Navigation
|navbar = yes
|title = Countries of Central Asia
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
}}

{{Navigation
|navbar = yes
|title = Countries of Central Asia
|body  = Afghanistan{{·}} Kazakhstan{{·}} Kyrgyzstan{{·}} Mongolia{{·}} Russia{{·}} Tajikistan{{·}} Turkmenistan{{·}} Uzbekistan
|show = yes
}}

Result