Difference between revisions of "Template:Lua sidebar"

From blackwiki
Jump to navigation Jump to search
imported>Tom.Reding
(Introduce a 2nd unnamed parameter to specify an alternate basepagename, to make this usable on sub-templates/modules)
imported>Tom.Reding
m (Undid revision 838810748 by Tom.Reding (talk))
Line 3: Line 3:
 
| content1 = {{div col|colwidth=8em}}
 
| content1 = {{div col|colwidth=8em}}
 
<div class="plainlist">
 
<div class="plainlist">
* [[Template:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}|Template]] {{#if:{{#invoke:redirect|isRedirect|Template talk:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}}}||([[Template talk:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}|talk]])}}
+
* [[Template:{{BASEPAGENAME}}|Template]] {{#if:{{#invoke:redirect|isRedirect|Template talk:{{BASEPAGENAME}}}}||([[Template talk:{{BASEPAGENAME}}|talk]])}}
* [[Template:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}/sandbox|Template sandbox]]
+
* [[Template:{{BASEPAGENAME}}/sandbox|Template sandbox]]
* [[Template:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}/testcases|Template testcases]]
+
* [[Template:{{BASEPAGENAME}}/testcases|Template testcases]]
* [[Special:PrefixIndex/Template:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}/|Template subpages]]
+
* [[Special:PrefixIndex/Template:{{BASEPAGENAME}}/|Template subpages]]
* [[Module:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}|Module]] {{#if:{{#invoke:redirect|isRedirect|Module talk:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}}}||([[Module talk:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}|talk]])}}
+
* [[Module:{{BASEPAGENAME}}|Module]] {{#if:{{#invoke:redirect|isRedirect|Module talk:{{BASEPAGENAME}}}}||([[Module talk:{{BASEPAGENAME}}|talk]])}}
* [[Module:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}/sandbox|Module sandbox]]
+
* [[Module:{{BASEPAGENAME}}/sandbox|Module sandbox]]
* [[Module:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}/testcases|Module testcases]]
+
* [[Module:{{BASEPAGENAME}}/testcases|Module testcases]]
* [[Special:PrefixIndex/Module:{{#if:{{{2|}}}|{{{2|}}}|{{BASEPAGENAME}}}}}/|Module subpages]]
+
* [[Special:PrefixIndex/Module:{{BASEPAGENAME}}/|Module subpages]]
 
</div>
 
</div>
 
{{div col end}}
 
{{div col end}}
 
| content2 = {{{1|}}}
 
| content2 = {{{1|}}}
 
}}<noinclude>{{documentation}}</noinclude>
 
}}<noinclude>{{documentation}}</noinclude>

Revision as of 12:36, 29 April 2018

Template documentation[view] [edit] [history] [purge]

This template displays links which are generated based on a page's base page name. These are useful for templates which work using a specific Lua module. The parameter |title= can be used to add the title of the template and module, if needed; |template= and |module= do the same, but for only the template and only the module respectively.

The first unnamed parameter or |1= can be used to add more information; {{Sidebar|child=yes}} can be used inside it for further customization. The default links use {{Div col}} and the plainlist CSS class.

Usage