Module:Module link/doc

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

This is the documentation page for Module:Module link


This module provides a link for all Scribunto module pages. It checks if a sandbox page of the module exists and if truly it exists then it returns both the link for the module and the link for the sandbox. This module can be used in wikitext pages and in Scribunto module pages.

  • For wikitext pages(templates): {{#invoke:Module link|main|Module:[name]}}
  • For Scribunto module pages [example]:
local p = {}
local mModuleLink = require('Module:Module link')._main
function p.example(frame)
 return mModuleLink({link="Module:Example"})
end
return p

Note: Change example to the name of the Module you want. This module implements {{Module link}} please use the template instead.

Examples

Wikitext
Gives

{{#invoke:Module link|main|Module:Arguments}}

Module:Arguments


{{#invoke:Module link|main|Module:Module link}}

Module:Module link (sandbox) -- because Module:Module link has a sandbox page, the link to the sandbox appears.


{{#invoke:Module link|main|Module:Module link|detectSandbox=off}}

Module:Module link -- because detectSandbox is set to off, the link to the sandbox page is now hidden.

Errors

When the link parameter is not provided, or it might but the value maybe empty, then the module returns an error stating: Error: parameter, value or both maybe missing, please inspect the codes carefully.

Error handling

  1. Please check, if you made a mistake in the coding, and try again. If the error continues then feel free to leave a message at this page's talkpage or at Codemini's talkpage. But sincerely speaking the error might be your mistake. You might want to check the parameter to see if it is in accordance with the one below.

Parameters

|1= |link=

  • A specific module name.

|detectSandbox=

  • For advanced template coding, when set to detectSandbox="off" hides the link to the sandbox page. Please refer to the examples below on how to use on pages and modules. Go to this page's talkpage to discuss any issue.

Example(templates): {{#invoke:Module link|link=Module:Example|detectSandbox=off}} or {{ml|link=Module:Example|detectSandbox=off}}

Example(modules):

local p = {}
local mModuleLink = require('Module:Module link')._main
function p.main(frame)
args = frame.args
link = args[1] or args.link
return mModuleLink({link=link, detectSandbox = "off"}) .. ' ([[Module talk:'..link..'|talk]])'
end
return p