Template:Lua

From Anarchy Online Wiki [AOWiki]
Template documentation[view] [edit] [history] [purge]

{{#ifeq:lua |doc

    | 

{{#ifeq:show |show

|
        }}{{#if: |
         |   {{#ifexist:Template:Lua
                  | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}

{{Lua{{#if:x |


     {{#if:{{#titleparts:{{#if:|  | Template:Lua }}|0|2}}
     | 
        
          
            
              
                
                       
                 
               
             
           
         
       
     | 
             
       
     }}   
   
 

}}|Module:Lua banner}}

This template is used to show that templates have been converted to Lua. It is placed at the top of the template's /doc page. It automatically adds the template to Category:Lua-based templates, or to one of its subcategories.

Usage[edit]

Basic
{{{{#if: |subst:}}Lua{{#if:module name ||module name}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}}
All parameters
{{{{#if: |subst:}}Lua{{#if:module 1 ||module 1}}{{#if:module 2 ||module 2}}{{#if:module 3 ||module 3}}{{#if:... ||...}}{{#if:category=custom category ||category=custom category}}{{#if:nocat=true ||nocat=true}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}}

The first module name is required.

Examples[edit]

  • {{{{#if: |subst:}}Lua{{#if:Module:Bananas ||Module:Bananas}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}}

{{Lua{{#if:x |


     {{#if:{{#titleparts:{{#if:|  | Template:Lua }}|0|2}}
     | 
        
          
            
              
                
                       
                 
               
             
           
         
       
     | 
             
       
     }}   
   
 

}}|Module:Bananas|nocat=true}}

  • {{{{#if: |subst:}}Lua{{#if:Module:Bananas ||Module:Bananas}}{{#if:Module:BananasArgs ||Module:BananasArgs}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}}

{{Lua{{#if:x |


     {{#if:{{#titleparts:{{#if:|  | Template:Lua }}|0|2}}
     | 
        
          
            
              
                
                       
                 
               
             
           
         
       
     | 
             
       
     }}   
   
 

}}|Module:Bananas|Module:BananasArgs|nocat=true}}

  • {{{{#if: |subst:}}Lua{{#if:Module:Bananas ||Module:Bananas}}{{#if:Module:BananasArgs ||Module:BananasArgs}}{{#if:Module:HelloWorld ||Module:HelloWorld}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}}

{{Lua{{#if:x |


     {{#if:{{#titleparts:{{#if:|  | Template:Lua }}|0|2}}
     | 
        
          
            
              
                
                       
                 
               
             
           
         
       
     | 
             
       
     }}   
   
 

}}|Module:Bananas|Module:BananasArgs|Module:HelloWorld|nocat=true}}

  • {{{{#if: |subst:}}Lua{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}}

{{Lua{{#if:x |


     {{#if:{{#titleparts:{{#if:|  | Template:Lua }}|0|2}}
     | 
        
          
            
              
                
                       
                 
               
             
           
         
       
     | 
             
       
     }}   
   
 

}}|nocat=true}}

Categorisation[edit]

Template category[edit]

This template adds pages to Category:Lua-based templates if the page is in the template namespace, and it is not on any of the subpages /doc, /sandbox, /sandbox2 or /testcases. You can specify a different category with the |{{#if:category|category=}} parameter, e.g. |{{#if:category|category=}}Lua String-based templates.

Some modules have a default category other than Category:Lua-based templates:

Error category[edit]

If no modules are specified, the transcluded page will be added to Category:Lua templates with errors.

Category suppression[edit]

To suppress all categorisation, use |{{#if:nocat|nocat=}}true. (As well as "true", the values "yes", "y", and "1" will also work.)

See also[edit]

{{#ifeq:Lua|sandbox | | }}

{{#if:|

[[Category:Template documentation pages{{#translation:}}]] }}