Module:If empty: Difference between revisions

From Runnina
Jump to navigation Jump to search
Module:If empty>MSGJ
lastk is not needed
 
m 1 revision imported
 
(No difference)

Latest revision as of 06:03, 9 July 2025

{{#ifeq:If empty|doc|{{#if:|Template:Pp}}|{{#switch:

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

| module = Template:Ombox{{#if:|| {{#ifeq: Module:If empty | Sandbox

    | 
    | {{#switch: If empty
        | doc | sandbox =
        | {{#ifeq:  | true 
            |  
            | {{#switch: protected
                | pre-alpha | prealpha | pa | experimental = 
                | alpha | a = 
                | beta | b = 
                | release | r | general | g | stable = 
                | broken | br | unstable = 
              }}
          }}
      }}
   }}

}}Template:Module rating/protected | other | #default = Template:Error }}}} Template:Cascade-protected template

Template:Used in system This module supports Template:If empty. See here for test cases.

{{#ifeq:If empty|sandbox | | }}


local p = {}

function p.main(frame)
	local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false})

	for k,v in ipairs(args) do
		if v ~= '' then
			return v
		end
	end

end

return p