Benutzer:Entzücklopädie/ModuleDoc/en

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen

Vorlage:ModuleDoc/DocPage This module provides helper functions for the template {{ModuleDoc}}.

Exported functions

[Bearbeiten | Quelltext bearbeiten]

parseTemplateLanguageLinks()

[Bearbeiten | Quelltext bearbeiten]

This 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.

  • a_frame: Frame holding the arguments from the invoke call and the link to the parent frame of the calling template.
  • module: The name of the attached module.

A string with wiki table syntax including wiki links to documentation pages for all languages submitted to the parent template.

includeFirstAvailableLanguage()

[Bearbeiten | Quelltext bearbeiten]

Function 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.

  • a_frame: Frame holding the arguments from the invoke call and the link to the parent frame of the calling template.
  • module: The name of the attached module.

A string with the expanded template of the first available documentation page.

DOC_PAGES_PREFIX

[Bearbeiten | Quelltext bearbeiten]

Constant 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

[Bearbeiten | Quelltext bearbeiten]

Constant 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.