Jump to content

Module:Separated entries/doc

From Wikihoc

This is the documentation page for Module:Separated entries

{{safesubst:#switch:

 {{safesubst:#if:
 | {{{demospace}}}    
 | {{safesubst:#ifeq:Module|Module
   | module
   | other
   }}
 }}

| module = {{#if:p|{{#switch:m |m

|t =

{{#if:||

     {{#switch: doc
        | doc | sandbox =
        | {{#ifeq:  | true 
            |  
            | {{#switch: p
                | pre-alpha | prealpha | pa | experimental = 
                | alpha | a                                = 
                | beta | b                                 = 
                | release | r | general | g | stable | protected | p | semiprotected | semiprotect | semi = 
                | deprecated | d | defunct = 

| broken | br | unstable =

              }}
          }}
      }}

}} | #default = }}|}}{{#switch:m |t|m = {{#if:

          |
          |{{#switch:Lua error in Module:Effective_protection_level at line 64: attempt to index field 'ext' (a nil value).
               |*|user = 
               |#default = {{#ifeq:doc|doc
                   |Lua error in Module:Effective_protection_level at line 64: attempt to index field 'ext' (a nil value).
                -->|Lua error in Module:Effective_protection_level at line 64: attempt to index field 'ext' (a nil value).}}}}}}

|#default = }} | other | #default = }}

Usage

Module:Separated entries serves as a template front-end to mw.text.listToText. It takes any number of positional parameters and pieces them together with |{{SAFESUBST:#if:separator|separator=}}. |{{SAFESUBST:#if:conjunction|conjunction=}} can be optionally defined if a different separator is desired between the last and second last items. The starting positional parameter can be specified using |{{SAFESUBST:#if:start|start=}}. Leading and trailing whitespace is stripped; if the |{{SAFESUBST:#if:separator|separator=}} should contain spaces, use the HTML escape code  . Separated entries does not raise any errors by design.

{{#invoke:Separated entries|main|separator=...}}