Difference between revisions of "Template:Navbox"

test>Fandyllic
(use onlyinclude over noinclude)
 
 
(18 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
Please do not edit without discussion first as this is a VERY complex template.
 
Please do not edit without discussion first as this is a VERY complex template.
  
--><onlyinclude>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table <!--
+
-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table cellspacing="0" <!--
 
  -->class="navbox" style="border-spacing:0;{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!--
 
  -->class="navbox" style="border-spacing:0;{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!--
  
--><table class="nowraplinks {{{bodyclass|}}} {{#if:{{{title|}}}|{{#switch:{{{state|}}}|<!--
+
--><table cellspacing="0" class="nowraplinks {{{bodyclass|}}} {{#if:{{{title|}}}|{{#switch:{{{state|}}}|<!--
  -->plain|off=|#default=mw-collapsible {{#switch:{{{state|}}}|collapsed=mw-collapsed|#default={{{state|}}}}}}}}} {{#switch:{{{border|{{{1|}}}}}}|<!--
+
  -->plain|off=|#default=collapsible {{#if:{{{state|}}}|{{{state}}}|autocollapse}}}}}} {{#switch:{{{border|{{{1|}}}}}}|<!--
 
  -->subgroup|child|none=navbox-subgroup" style="border-spacing:0;{{{bodystyle|}}};{{{style|}}}|<!--
 
  -->subgroup|child|none=navbox-subgroup" style="border-spacing:0;{{{bodystyle|}}};{{{style|}}}|<!--
 
  -->#default=navbox-inner" style="border-spacing:0;background:transparent;color:inherit}};{{{innerstyle|}}};"><!--
 
  -->#default=navbox-inner" style="border-spacing:0;background:transparent;color:inherit}};{{{innerstyle|}}};"><!--
Line 24: Line 24:
 
  -->{{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<span style="float:right;width:6em;">&nbsp;</span>}}|<!--
 
  -->{{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<span style="float:right;width:6em;">&nbsp;</span>}}|<!--
 
  -->{{#ifeq:{{{state|}}}|plain||<span style="float:left;width:6em;">&nbsp;</span>}}}}|<!--
 
  -->{{#ifeq:{{{state|}}}|plain||<span style="float:left;width:6em;">&nbsp;</span>}}}}|<!--
  -->{{#if:{{{name|}}}|{{Navbar|{{{name}}}|mini=1|style={{{navbarstyle|}}}|<!--
+
  -->{{#if:{{{name|}}}|{{Navbar|{{{name}}}|mini=1|<!--
  -->fontstyle={{{navbarfontstyle|{{{basestyle|}}};{{{titlestyle|}}}}}};background:none transparent;border:none;}}|<!--
+
  -->fontstyle={{{basestyle|}}};{{{titlestyle|}}};background:none transparent;border:none;}}|<!--
 
  --><span class="error" style="float:left;white-space:nowrap;">Error: No name provided</span>}}<!--
 
  --><span class="error" style="float:left;white-space:nowrap;">Error: No name provided</span>}}<!--
 
  -->{{#ifeq:{{{state|}}}|plain|<span style="float:right;width:6em;">&nbsp;</span>}}}}<!--
 
  -->{{#ifeq:{{{state|}}}|plain|<span style="float:right;width:6em;">&nbsp;</span>}}}}<!--
Line 276: Line 276:
  
  
--></table>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=<div>|none=|#default=</td></tr></table>}}<!--
+
--></table>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=<div>|none=|#default=</td></tr></table>}}
 
 
-->{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{#ifeq:{{{border|{{{1|}}}}}}|child||{{#ifeq:{{{border|{{{1|}}}}}}|subgroup||{{#switch:{{lc:{{SUBPAGENAME}}}}
 
|doc
 
|sandbox
 
|testcases =
 
|#default = {{#switch:{{{bodyclass|}}}
 
  |plainlist
 
  |hlist
 
  |hlist hnum
 
  |hlist vcard
 
  |vcard hlist =
 
  |#default = {{#switch:{{{listclass|}}}
 
  |plainlist
 
  |hlist
 
  |hlist hnum
 
  |hlist vcard
 
  |vcard hlist =
 
  |#default = {{#ifeq:{{{tracking|}}}|no||[[Category:Navigational boxes without horizontal lists]]}}
 
  }}
 
  }}
 
}}
 
}}}}}}<!--
 
 
 
-->{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{#switch:{{lc:{{SUBPAGENAME}}}}
 
|sandbox
 
|testcases =
 
|#default = {{#switch:{{{liststyle|}}}
 
  |padding: 0.25em 0; line-height: 1.3em;
 
  |padding:0.25em 0; line-height:1.4em; width:auto;
 
  |padding:0.4em 0; line-height:1.4em; = [[Category:Navigational boxes with custom list spacing]]
 
  |#default =
 
}}
 
}}}}<includeonly>{{template other|{{#if:{{{titlestyle|}}}{{{groupstyle|}}}|[[Category:Navboxes using background colours]]}}}}</includeonly></onlyinclude>{{documentation}}<!-- Add categories and interwikis to the /doc sub-page -->
 

Latest revision as of 20:08, 26 August 2021