Module:Magicwords

-- --| Returns variables from on the mediawiki title library (see http://dev.wikia.com/wiki/Lua_templating/Reference_manual/Scribunto_libraries), some of which may not be accessible using built-in magic words. --|Usage : --|Example: local p = {} --% Retrieves a variable aka Magic word from the title library --@ frame (table) A scribunto frame --: (string) a variable aka Magic word from the title library function p.main(frame) local args = require("Dev:Arguments").getArgs(frame) local variables = args[1] local currTitle = mw.title.getCurrentTitle if (variables) and type(currTitle[variables]) ~="function" and type(currTitle[variables]) ~="table" then return currTitle[variables] end end