Difference between revisions of "Template:Navbox small"

From Robowiki
Jump to navigation Jump to search
(Adjust syntax, might make it work?)
m
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
+
<!--
 +
 
 +
This is one of complex template, DO NOT EDIT IF YOU DON'T KNOW WHAT YOU ARE DOING.
 +
 
 +
--><includeonly>
 
; {{{title|Navigation}}}<nowiki>:</nowiki>
 
; {{{title|Navigation}}}<nowiki>:</nowiki>
 
:<!--
 
:<!--
-->{{if:test={{{parent|}}}|then=[[{{{parent}}}]] -&nbsp;}}<!--
+
-->{{if|test={{{parent|}}}|then={{ifeq|{{{parent}}}|{{PAGENAME}}|<!--nothing-->|{{ifeq|{{{parent}}}|{{FULLPAGENAME}}|<!--nothing-->|[[{{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|{{{parent}}}]] -&nbsp;}}}}}}<!--
-->{{ifeq:{{{parent}}}|{{PAGENAME}}|3=|4=[[{{{parent}}}]] -&nbsp;}}<!--
+
-->{{if|test={{{page1|}}}|then=[[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page1}}}{{!}}{{{title1|{{{page1}}}}}}]]}}<!--
-->{{if:test={{{page1|}}}|then=[[{{{parent|{{PAGENAME}}}}}/{{{page1}}}{{!}}{{{title1|{{{page1}}}}}}]]}}<!--
+
-->{{if|test={{{page2|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page2}}}{{!}}{{{title2|{{{page2}}}}}}]]}}<!--
-->{{if:test={{{page2|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page2}}}{{!}}{{{title2|{{{page2}}}}}}]]}}<!--
+
-->{{if|test={{{page3|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page3}}}{{!}}{{{title3|{{{page3}}}}}}]]}}<!--
-->{{if:test={{{page3|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page3}}}{{!}}{{{title3|{{{page3}}}}}}]]}}<!--
+
-->{{if|test={{{page4|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page4}}}{{!}}{{{title4|{{{page4}}}}}}]]}}<!--
-->{{if:test={{{page4|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page4}}}{{!}}{{{title4|{{{page4}}}}}}]]}}<!--
+
-->{{if|test={{{page5|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page5}}}{{!}}{{{title5|{{{page5}}}}}}]]}}<!--
-->{{if:test={{{page5|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page5}}}{{!}}{{{title5|{{{page5}}}}}}]]}}<!--
+
-->{{if|test={{{page6|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page6}}}{{!}}{{{title6|{{{page6}}}}}}]]}}<!--
-->{{if:test={{{page6|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page6}}}{{!}}{{{title6|{{{page6}}}}}}]]}}<!--
+
-->{{if|test={{{page7|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page7}}}{{!}}{{{title7|{{{page7}}}}}}]]}}<!--
-->{{if:test={{{page7|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page7}}}{{!}}{{{title7|{{{page7}}}}}}]]}}<!--
+
-->{{if|test={{{page8|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page8}}}{{!}}{{{title8|{{{page8}}}}}}]]}}<!--
-->{{if:test={{{page8|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page8}}}{{!}}{{{title8|{{{page8}}}}}}]]}}<!--
+
-->{{if|test={{{page9|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page9}}}{{!}}{{{title9|{{{page9}}}}}}]]}}<!--
-->{{if:test={{{page9|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page9}}}{{!}}{{{title9|{{{page9}}}}}}]]}}<!--
+
-->{{if|test={{{page10|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page10}}}{{!}}{{{title10|{{{page10}}}}}}]]}}<!--
-->{{if:test={{{page10|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page10}}}{{!}}{{{title10|{{{page10}}}}}}]]}}<!--
+
-->{{if|test={{{page11|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page11}}}{{!}}{{{title11|{{{page11}}}}}}]]}}<!--
-->{{if:test={{{page11|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page11}}}{{!}}{{{title11|{{{page11}}}}}}]]}}<!--
+
-->{{if|test={{{page12|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page12}}}{{!}}{{{title12|{{{page12}}}}}}]]}}<!--
-->{{if:test={{{page12|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page12}}}{{!}}{{{title12|{{{page12}}}}}}]]}}<!--
+
-->{{if|test={{{page13|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page13}}}{{!}}{{{title13|{{{page13}}}}}}]]}}<!--
-->{{if:test={{{page13|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page13}}}{{!}}{{{title13|{{{page13}}}}}}]]}}<!--
+
-->{{if|test={{{page14|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page14}}}{{!}}{{{title14|{{{page14}}}}}}]]}}<!--
-->{{if:test={{{page14|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page14}}}{{!}}{{{title14|{{{page14}}}}}}]]}}<!--
+
-->{{if|test={{{page15|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page15}}}{{!}}{{{title15|{{{page15}}}}}}]]}}<!--
-->{{if:test={{{page15|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page15}}}{{!}}{{{title15|{{{page15}}}}}}]]}}<!--
+
-->{{if|test={{{page16|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page16}}}{{!}}{{{title16|{{{page16}}}}}}]]}}<!--
-->{{if:test={{{page16|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page16}}}{{!}}{{{title16|{{{page16}}}}}}]]}}<!--
+
-->{{if|test={{{page17|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page17}}}{{!}}{{{title17|{{{page17}}}}}}]]}}<!--
-->{{if:test={{{page17|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page17}}}{{!}}{{{title17|{{{page17}}}}}}]]}}<!--
+
-->{{if|test={{{page18|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page18}}}{{!}}{{{title18|{{{page18}}}}}}]]}}<!--
-->{{if:test={{{page18|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page18}}}{{!}}{{{title18|{{{page18}}}}}}]]}}<!--
+
-->{{if|test={{{page19|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page19}}}{{!}}{{{title19|{{{page19}}}}}}]]}}<!--
-->{{if:test={{{page19|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page19}}}{{!}}{{{title19|{{{page19}}}}}}]]}}<!--
+
-->{{if|test={{{page20|}}}|then=&nbsp;- [[{{if|test={{{parent|}}}|then={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:}}{{{parent}}}|else={{if|test={{{namespace|{{NAMESPACE}}}}}|then={{{namespace|{{NAMESPACE}}}}}:{{PAGENAME}}|else={{FULLPAGENAME}}}}}}/{{{page20}}}{{!}}{{{title20|{{{page20}}}}}}]]}}<!--
-->{{if:test={{{page20|}}}|then=&nbsp;- [[{{{parent|{{PAGENAME}}}}}/{{{page20}}}{{!}}{{{title20|{{{page20}}}}}}]]}}<!--
+
--></includeonly><noinclude>
--></includeonly>
 
<noinclude>
 
 
Small navigation bar. Create from style [[Voidious]] use in sub-pages link. Currently support up to 20 links.
 
Small navigation bar. Create from style [[Voidious]] use in sub-pages link. Currently support up to 20 links.
 
 
<br style="clear:both" />
 
<br style="clear:both" />
 
<div style="padding: 0px 5px 0px 5px; border: 1px solid #aaa; margin-bottom: 1ex; background-color: #EFE">
 
<div style="padding: 0px 5px 0px 5px; border: 1px solid #aaa; margin-bottom: 1ex; background-color: #EFE">
Line 35: Line 36:
 
=== Usage ===
 
=== Usage ===
 
<div style="width:250px; background:#dddddd; border:1px solid black; padding:0.5em 1em 0.5em 1em;">
 
<div style="width:250px; background:#dddddd; border:1px solid black; padding:0.5em 1em 0.5em 1em;">
<pre>{{Infobox Robot
+
<pre>{{Navbox small
 
| title          =  
 
| title          =  
 
| parent          =
 
| parent          =
 +
| namespace      =
 
| page1          =  
 
| page1          =  
 
| title1          =
 
| title1          =
Line 51: Line 53:
 
| style="width: 18%" | title || Title of navigation, default as 'Navigation'.
 
| style="width: 18%" | title || Title of navigation, default as 'Navigation'.
 
|-
 
|-
|| parent || Parent page, omit for current page
+
|| parent || Parent page, omit for current page. Do not include namespace.
 +
|-
 +
|| namespace || Namespace of the page, usually this is need not to specify since it will automatically detect from current page.
 
|-
 
|-
 
|| pageN || Suppage name, do not put the parrent page prefix.
 
|| pageN || Suppage name, do not put the parrent page prefix.

Latest revision as of 08:54, 2 May 2009

Small navigation bar. Create from style Voidious use in sub-pages link. Currently support up to 20 links.

Documentation

Usage

{{Navbox small
| title           = 
| parent          =
| namespace       = 
| page1           = 
| title1          =
| page2           =
| title2          =
...
}}

Parameters

title Title of navigation, default as 'Navigation'.
parent Parent page, omit for current page. Do not include namespace.
namespace Namespace of the page, usually this is need not to specify since it will automatically detect from current page.
pageN Suppage name, do not put the parrent page prefix.
titleN Text to show for each suppage link.

Please if anyone can write better documentation, current one is really really un-understandable (not very clear).