Module:Imahero/test/doc: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
(Created page with "See usage on user:imahero/test.")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
See usage on [[user:imahero/test]].
See usage on [[user:imahero/test]].<noinclude>
 
==Embed Code Example==
Example of embedding code on a page (this code does nothing and is just for show):
<syntaxhighlight lang="lua" line='line'>
local p = {} --p stands for package
 
function p.test( frame )
    return frame
end
 
langObject = mw.getLanguage( 'simple' )
 
function p.language( frame )
    return langObject:getCode()
end
 
function p.arrow( frame )
    return langObject:getArrow( frame.args.direction )
end
 
return p
</syntaxhighlight></noinclude>

Latest revision as of 21:05, 2 December 2023

See usage on user:imahero/test.

Embed Code Example[edit | hide | hide all]

Example of embedding code on a page (this code does nothing and is just for show):

local p = {} --p stands for package

function p.test( frame )
    return frame
end

langObject = mw.getLanguage( 'simple' )

function p.language( frame )
    return langObject:getCode()
end

function p.arrow( frame )
    return langObject:getArrow( frame.args.direction )
end

return p