Difference between revisions of "Template:Navbox"

From Second Life Wiki
Jump to navigation Jump to search
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<onlyinclude><div id="box" style="float: right; background:#96C5AF; margin-left: 10px; max-width: 30%;">
<onlyinclude><div id="box" style="float: {{{float|right}}}; background:{{{title-bg-color|#96C5AF}}}; margin-left: 10px; max-width: {{{width|80%}}};{{{1|}}}">
<div style="text-align: center; font-size: 16px; padding: 5px; color: black">'''{{{title}}}'''</div>
<div style="text-align: center; font-size: 16px; padding: 5px; color: {{{title-color|black}}}" class="navbox-content">'''{{{title}}}'''</div>
<div style="padding: 0.5em; background:#ffffff;">
<div style="padding: 0.5em; background:{{{content-bg-color|#ffffff}}}; color:{{{content-color|black}}}" class="navbox-content">
{{{content}}}
{{{content}}}
</div></div></onlyinclude>
</div></div></onlyinclude>


This is a simple template intended for use in creating navigation templates.  It takes two parameters:
This is a simple template intended for use in creating navigation templates.  It takes two parameters:
* title - Title of the navigation group.  This can also be a link using normal wiki syntax.
* '''title''' - Title of the navigation group.  This can also be a link using normal wiki syntax.
* content - Text to appear in the navigation template "box".  The expectation is that this is generally a bulleted list; though it can be in any text.
* '''content''' - Text to appear in the navigation template "box".  The expectation is that this is generally a bulleted list; though it can be in any text.
* '''content-bg-color''' (optional) - Background color of content area (default is white)
* '''content-color''' (optional) - color of content text (default is black)
* '''title-bg-color''' (optional) - Specify a color if you want to use something other than the <span style="background:#96C5AF; padding: 3px;">default  blue-green color</span>.
* '''title-color''': color of title text; default is black.
* '''float''' (optional) - CSS float position. Default is right.
* '''width''' (optional) - max width. Default is 30%


== Usage ==
== Usage ==
Line 18: Line 24:
</div>
</div>


{{KBtip|1=You can use a nested template for the "content", assuring if you make one change to the nested template, it will sync across all instances of the same Navbox. This saves time and trouble when you have to add or remove pages from the navigational structure. For example, [[Linden_Lab_Official:Maturity_ratings:_an_overview|see the navbox code on this page]], which points to [[Template:Navbox/Adult]] and [[Template:Navbox/Adult-title]].
{{KBtip|1=See the [[Style_guide#Navigation_Templates|Style Guide]] for Navbox usage relevant to the [[Knowledge Base]].}}


== Example ==
== Example ==

Latest revision as of 16:14, 9 May 2011

This is a simple template intended for use in creating navigation templates. It takes two parameters:

  • title - Title of the navigation group. This can also be a link using normal wiki syntax.
  • content - Text to appear in the navigation template "box". The expectation is that this is generally a bulleted list; though it can be in any text.
  • content-bg-color (optional) - Background color of content area (default is white)
  • content-color (optional) - color of content text (default is black)
  • title-bg-color (optional) - Specify a color if you want to use something other than the default blue-green color.
  • title-color: color of title text; default is black.
  • float (optional) - CSS float position. Default is right.
  • width (optional) - max width. Default is 30%

Usage

{{Navbox
|title=your title
|content=your content
}}
KBtip2.png Tip: See the Style Guide for Navbox usage relevant to the Knowledge Base.

Example

Input:

{{Navbox
|title=[[User:Magellan Linden|Magellan]]'s Discoveries
|content=*[[Nautilus City investigation|Nautilus City]]
**[[Magellan_and_Gaeta|Gaeta]]
**[[LDPW]]
*[[Agni]]
*[[Aditi]]
}}

Output: