Lua and Wikicode comparison charts

From Liquipedia Commons

Attributes[edit]

Attribute Wikicode HTML Lua
colspan
{|
|- colspan="2"
! Content
|}
<th colspan="2">Content</th>
local tr:tag('th')
th:attr('colspan','2')
th:wikitext('Content')

Magic words[edit]

Wikicode Lua
{{PAGENAME}}
mw.title.getCurrentTitle().text
{{CURRENTMONTH}}
frame:callParserFunction('CURRENTMONTH')

Variables[edit]

Wikicode Lua
{{#var:variablename}}
mw.ext.VariablesLua.var('variablename')
{{#vardefine:variablename|12345}}
mw.ext.VariablesLua.vardefine('variablename', '12345')
{{#vardefineecho:variablename|12345}}
mw.ext.VariablesLua.vardefineecho('variablename', '12345')

Miscellaneous[edit]

Wikicode Lua
{{lc:{{{value}}}}}
string.lower(args['value'])
{{flag/us}}
frame:expandTemplate{ title = 'flag/us' }
{{flag/{{{flag1}}}}}
frame:expandTemplate{ title = 'flag/' .. args['flag1'] }
{{team/team liquid|2018-09-18}}
frame:expandTemplate{ title = 'team/team liquid', args = {'2018-09-18'} }
{{#resolve_redirect:name}}
mw.ext.TeamLiquidIntegration.resolve_redirect('name')

External Links[edit]