Jump to content

Module:Sandbox/KEmel49/doc

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by KEmel49 (talk | contribs) at 06:05, 5 July 2025 (test). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
  • Step 1:

This will go in module

function p.hello(frame)
	if frame.args[1] == nil then
		return "[[Module:Sandbox/KEmel49]]"
	elseif frame.args[1] then
		return '[[Module:'..frame.args[1]..'|'..frame.args[1]..']]'
    end
end
return p
  • Step 2:

This will go in template page

{{#invoke:Sandbox/KEmel49|hello}}
  • Step 3:

Final output

- if template page is transluded like:

{{Templatepage}}

output:
Module:Sandbox/KEmel49

- if template page is transluded like:

{{Templatepage |Math}}

output:
Module:Math

[edit]