Difference between revisions of "Template:Main talk other flex/sandbox"
Jump to navigation
Jump to search
test>Davidgothberg (Creating this sandbox with the current code from the template.) |
test>Davidgothberg (Removing the x:s since MediaWiki can handle empty values in switch cases. Lower casing the ns:0 is not necessary since it is an empty string, but just in case people reuse it for other namespaces.) |
||
| Line 1: | Line 1: | ||
{{#switch: | {{#switch: | ||
| − | {{lc: | + | {{lc: <!--Lower case the result--> |
<!--If no or empty "demospace" parameter then use x+NAMESPACE--> | <!--If no or empty "demospace" parameter then use x+NAMESPACE--> | ||
{{#if:{{{demospace|}}} | {{#if:{{{demospace|}}} | ||
| {{{demospace}}} | | {{{demospace}}} | ||
| − | | | + | | {{NAMESPACE}} |
}} | }} | ||
}} | }} | ||
| main | | main | ||
| − | | | + | | {{lc:{{ns:0}}}} = <!--Parameter "main" or main (article) space--> |
<!--If any parameter, then don't return the "main" string--> | <!--If any parameter, then don't return the "main" string--> | ||
| Line 14: | Line 14: | ||
| talk | | talk | ||
| − | | | + | | user talk |
| − | + | | wikipedia talk | |
| − | | | + | | image talk |
| − | | | + | | mediawiki talk |
| − | | | + | | template talk |
| − | | | + | | help talk |
| − | | | + | | category talk |
| − | | | + | | portal talk = <!--Parameter "talk" or any talk space--> |
| − | | | ||
{{#if:{{{1|}}}{{{2|}}}{{{3|}}} | {{{2|}}} | talk }} | {{#if:{{{1|}}}{{{2|}}}{{{3|}}} | {{{2|}}} | talk }} | ||
| other | | other | ||
| − | | | + | | user |
| − | | | + | | wikipedia |
| − | | | + | | image |
| − | | | + | | mediawiki |
| − | | | + | | template |
| − | | | + | | help |
| − | | | + | | category |
| − | | | + | | portal |
| − | | #default = | + | | #default = <!--Parameter "other" or other space--> |
{{#if:{{{1|}}}{{{2|}}}{{{3|}}} | {{{3|}}} | other }} | {{#if:{{{1|}}}{{{2|}}}{{{3|}}} | {{{3|}}} | other }} | ||
Revision as of 19:28, 18 April 2008
other