Difference between revisions of "Template:Tnavbox basic"
Jump to navigation
Jump to search
m (update) |
m (debug) |
||
| Line 57: | Line 57: | ||
<nowiki><</nowiki>/includeonly<nowiki>></nowiki> | <nowiki><</nowiki>/includeonly<nowiki>></nowiki> | ||
| − | <nowiki>< | + | <nowiki><</nowiki>noinclude> |
| − | <nowiki>[[Category:Template]]< | + | <nowiki>[[</nowiki>Category:Template]] |
| − | <nowiki> | + | <nowiki><</nowiki>/noinclude> |
</pre> | </pre> | ||
| Line 67: | Line 67: | ||
<pre> | <pre> | ||
| − | {{Tnb_NEW_TEMPLATE | + | <nowiki>{{</nowiki>Tnb_NEW_TEMPLATE |
|titlelink=LINK FOR NAVIGATION BOX TITLE (OPTIONAL) | |titlelink=LINK FOR NAVIGATION BOX TITLE (OPTIONAL) | ||
|titletext=TEXT TO DISPLAY IN NAVIGATION BOX TITLE | |titletext=TEXT TO DISPLAY IN NAVIGATION BOX TITLE | ||
|body={{nowrap|[[LINK 1|TEXT 1]] •}} {{nowrap|[[LINK 2|TEXT 2]] •}} (...more items...) {{nowrap|[[ LINK N|TEXT N]]}} | |body={{nowrap|[[LINK 1|TEXT 1]] •}} {{nowrap|[[LINK 2|TEXT 2]] •}} (...more items...) {{nowrap|[[ LINK N|TEXT N]]}} | ||
| − | }} | + | <nowiki>}}</nowiki> |
</pre> | </pre> | ||
Note that all '''body''' entries must be on one line. | Note that all '''body''' entries must be on one line. | ||
Revision as of 14:16, July 19, 2007
| Template: Tnavbox basic | |
|---|---|
| Use on | Navigation box templates |
| Use for | Create template for new horizontal nav boxes |
| Category template applies to page | Template |
| Template Parameters (See using templates). | |||
|---|---|---|---|
| Name | Purpose | Required? | Comment |
| width | Width of box in per cent | no | Default 100 |
| titleback-color | Title bar background color | no | defined color name or hex value (#xxyyzz) |
| titletext-color | Title bar text color | no | idem |
| bodyback-color | Body background color | no | idem |
| bodytext-color | Body text color | no | idem |
This template is a constructor for horizontal navbox templates. The new template takes three parameters:
{{{titlelink}}}
{{{titletext}}}
{{{body}}}
Sample text block
Copy and paste the following to new navbox template.
<includeonly>
{{Tnavbox_basic
|titleback-color=
|titletext-color=
|bodyback-color=
|bodytext-color=
|titlelink={{#if:{{{titlelink|}}} | <!-- then: include link and pipe-->{{{titlelink}}}{{!}} | <!-- else: nothing -->}}
|titletext={{{titletext}}}
|body={{{body}}}
}}
</includeonly>
<noinclude>
[[Category:Template]]
</noinclude>
Note: This creates a template to use for a family of horizontal navboxes, it does not create the navboxes themselves! Name new templates in the style Tnb_NEW_TEMPLATE. Do not forget to document any new template and navboxes you create.
Documentation for new templates will take the form:
{{Tnb_NEW_TEMPLATE
|titlelink=LINK FOR NAVIGATION BOX TITLE (OPTIONAL)
|titletext=TEXT TO DISPLAY IN NAVIGATION BOX TITLE
|body={{nowrap|[[LINK 1|TEXT 1]] •}} {{nowrap|[[LINK 2|TEXT 2]] •}} (...more items...) {{nowrap|[[ LINK N|TEXT N]]}}
}}
Note that all body entries must be on one line.