Benutzer:Entzücklopädie/ModuleDoc/en
Vorlage:ModuleDoc/DocPage This module provides helper functions for the template {{ModuleDoc}}.
Exported functions
BearbeitenparseTemplateLanguageLinks()
BearbeitenThis function parses the language codes submitted to the calling template within the arguments 1 .. n. For every language code a left-floating table with a link pointing to the documentation page is created, no matter whether the page exists or not. For non-existent pages also a create-link using a preload page is displayed.
Parameters
Bearbeiten- a_frame: Frame holding the arguments from the invoke call and the link to the parent frame of the calling template.
Arguments
Bearbeiten- module: The name of the attached module.
Return value
BearbeitenA string with wiki table syntax including wiki links to documentation pages for all languages submitted to the parent template.
includeFirstAvailableLanguage()
BearbeitenFunction for including the first available documentation page. The language codes submitted to the parent template are processed from left to right and the first existing documentation page is included as template.
Parameters
Bearbeiten- a_frame: Frame holding the arguments from the invoke call and the link to the parent frame of the calling template.
Arguments
Bearbeiten- module: The name of the attached module.
Return value
BearbeitenA string with the expanded template of the first available documentation page.
Internals
BearbeitenDOC_PAGES_PREFIX
BearbeitenConstant holding the prefix of the documentation pages. The default value is Wikipedia:Lua/Module/
. So documentation pages are expected at Wikipedia:Lua/Module/MODULENAME/??
where ?? is the language code.
DOC_PAGE_PRELOAD
BearbeitenConstant pointing to the preload page, which is included in the editbox if the create link below a non-existent documentation language is clicked. The default value is Vorlage:ModuleDoc/DocPage/preload
.