Module:If empty
From Tales from Chyria
| This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
Lua error in Module:Effective_protection_level at line 63: attempt to index field 'TitleBlacklist' (a nil value).
| This module can only be edited by administrators because it is transcluded onto one or more cascade-protected pages. |
| This module depends on the following other modules: |
| This Lua module is used in system messages, and on approximately 4,100,000 pages, or roughly 1889401% of all pages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
This module supports Template:If empty. See here for test cases.
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