Difference between revisions of "Template:Main talk other flex/sandbox"

From blackwiki
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:             <!--Lower case the result-->
+
   {{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}}}
     | x{{NAMESPACE}}  
+
     | {{NAMESPACE}}  
 
     }}  
 
     }}  
 
   }}
 
   }}
 
| main
 
| main
| x =               <!--Parameter "main" or main (article) space-->
+
| {{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
| xtalk             
+
| user talk
| xuser talk
+
| wikipedia talk
| xwikipedia talk
+
| image talk
| ximage talk
+
| mediawiki talk
| xmediawiki talk
+
| template talk
| xtemplate talk
+
| help talk
| xhelp talk
+
| category talk  
| xcategory talk  
+
| portal talk =       <!--Parameter "talk" or any talk space-->
| xportal talk =     <!--Parameter "talk" or any talk space-->
 
  
 
{{#if:{{{1|}}}{{{2|}}}{{{3|}}} | {{{2|}}} | talk }}
 
{{#if:{{{1|}}}{{{2|}}}{{{3|}}} | {{{2|}}} | talk }}
  
 
| other
 
| other
| xuser
+
| user
| xwikipedia
+
| wikipedia
| ximage
+
| image
| xmediawiki
+
| mediawiki
| xtemplate
+
| template
| xhelp
+
| help
| xcategory
+
| category
| xportal
+
| portal
| #default =         <!--Parameter "other" or other space-->
+
| #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