This wiki is out of date, use the continuation of this wiki instead

Template:Navbox

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:37, 10 March 2008 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Revision as of 16:57, 10 March 2008 (edit) (undo)
Sandman (Talk | contribs)
(Added listnames as parameters)
Next diff →
Line 13: Line 13:
list3, // separate elements with the delimiter "," or specify it with ''listseparator'' list3, // separate elements with the delimiter "," or specify it with ''listseparator''
list4, // separate elements with the delimiter "," or specify it with ''listseparator'' list4, // separate elements with the delimiter "," or specify it with ''listseparator''
 +listname, // name of the list
 +listname1, // name of the list
 +listname2, // name of the list
 +listname3, // name of the list
 +listname4, // name of the list
listseparator, // specify a listseparator (default: ",") listseparator, // specify a listseparator (default: ",")
talign, // title align (left/right/center/justify) (default: center) talign, // title align (left/right/center/justify) (default: center)
Line 18: Line 23:
</pre> </pre>
</noinclude>{| border="1" cellpadding="2" style="width: 100%; border-collapse: collapse; margin-left:auto; margin-right:auto; font-size: 90%; background: #FFF9F2; text-align:{{#if:{{{align|}}}|{{{align}}}|center}}" </noinclude>{| border="1" cellpadding="2" style="width: 100%; border-collapse: collapse; margin-left:auto; margin-right:auto; font-size: 90%; background: #FFF9F2; text-align:{{#if:{{{align|}}}|{{{align}}}|center}}"
-| style="font-size: 110%; background: #FF9966; text-align:{{#if:{{{talign|}}}|{{{talign}}}|center}}" | '''{{{name}}}'''+| colspan="2" style="font-size: 110%; background: #FF9966; text-align:{{#if:{{{talign|}}}|{{{talign}}}|center}}" | '''{{{name}}}'''
-{{if||{{{list|}}}|{{nln}}{{!-}}{{nln}}{{!}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list}}}|,|&#32;•&#32;}}}}}}{{if||{{{list1|}}}|{{nln}}{{!-}}{{nln}}{{!}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list1}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list1}}}|,|&#32;•&#32;}}}}}}{{if||{{{list2|}}}|{{nln}}{{!-}}{{nln}}{{!}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list2}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list2}}}|,|&#32;•&#32;}}}}}}{{if||{{{list3|}}}|{{nln}}{{!-}}{{nln}}{{!}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list3}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list3}}}|,|&#32;•&#32;}}}}}}{{if||{{{list4|}}}|{{nln}}{{!-}}{{nln}}{{!}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list4}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list4}}}|,|&#32;•&#32;}}}}}}+{{if||{{{list|}}}|{{nln}}{{!-}}{{if||{{{listname}}}|{{nln}}{{!}}'''{{{listname}}}'''}}{{nln}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list}}}|,|&#32;•&#32;}}}}|}}{{if||{{{list1|}}}|{{nln}}{{!-}}{{if||{{{listname1}}}|{{nln}}{{!}}'''{{{listname1}}}'''}}{{nln}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list1}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list1}}}|,|&#32;•&#32;}}}}|}}{{if||{{{list2|}}}|{{nln}}{{!-}}{{if||{{{listname2}}}|{{nln}}{{!}}'''{{{listname2}}}'''}}{{nln}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list2}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list2}}}|,|&#32;•&#32;}}}}|}}{{if||{{{list3|}}}|{{nln}}{{!-}}{{if||{{{listname3}}}|{{nln}}{{!}}'''{{{listname3}}}'''}}{{nln}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list3}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list3}}}|,|&#32;•&#32;}}}}|}}{{if||{{{list4|}}}|{{nln}}{{!-}}{{if||{{{listname4}}}|{{nln}}{{!}}'''{{{listname4}}}'''}}{{nln}}{{!}}{{#if:{{{listseperator|}}}|{{#replace:{{{list4}}}|{{{listseperator}}}|&#32;{{Navbox_listseperator}}&#32;}}|{{#replace:{{{list4}}}|,|&#32;•&#32;}}}}|}}
|}<noinclude> |}<noinclude>
== Example == == Example ==

Revision as of 16:57, 10 March 2008

Template

Navigation box template.

Throw in a name and a list of items and they will appear in this box. It's centered and 100% wide.

Variables:

name, // title (mandatory)
list, // separate elements with the delimiter "," or specify it with ''listseparator''
list1, // separate elements with the delimiter "," or specify it with ''listseparator''
list2, // separate elements with the delimiter "," or specify it with ''listseparator''
list3, // separate elements with the delimiter "," or specify it with ''listseparator''
list4, // separate elements with the delimiter "," or specify it with ''listseparator''
listname, // name of the list
listname1, // name of the list
listname2, // name of the list
listname3, // name of the list
listname4, // name of the list
listseparator, // specify a listseparator (default: ",")
talign, // title align (left/right/center/justify) (default: center)
align, // align the list elements (left/right/center/justify) (default: center)
{{{name}}}

Example

{{Navbox2
  | name = Apples
  | list = Elstar,Goudrenet,Golden Delicious,etc
}}
Apples
Elstar • Goudrenet • Golden Delicious • etc
Personal tools