Vikipedio:Lua/Moduloj/Ŝablono:Handle

Ŝablona programado Diskutoj Lua Testoj Subpaĝoj
Modulo Esperanto English Deutsch

Modulo: Dokumentado

Ŝablono:Handle – Module to generate titled external links to web ressources by solver, transcluded by templates.

Template:Handle might be an abstract concept with two instances to be supported:

Functions for templates

f
Format.
Parameters from template transclusion:
1
Identifier
  • Might be escaped for URL or HTML, but after slash / only.
Alternatively:
Result of a previous evaluation; with URL or error message or as wikilink; even nothing.
problem
1 – show a remark about temporary unavailability
NoCat
1 – suppress general error category defined by errCat this time.
demo
1 – suppress any hiding of error messages this time; e.g. for documentation and examples
Parameters with #invoke for project specific adaption; all but scheme optional:
scheme
Code of coverage, mandatory:
  • doi
  • hdl
errCat
title of an error category for invalid DOI parameter etc.
errClasses
classes for selection of error messages; e.g. error
errHide
1 – hide error messages by default
errNS
space separated list of namespace numbers where to use errCat
default: all pages, all namespaces, if errCat defined
parProblem
name of „problem“ parameter – default: problem
showArticle
page name for doi: schema link – default: Digital Object Identifier
empty calue: do not link schema
Return: external link, or error message, maybe as class="error".


Ĝeneralaj atentigoj pri la enplektado de moduloj

Enplektado okazas ĉiam en la formato

{{#invoke: Ŝablono:Handle | Funkcionomo | valoro1 | valoro2 | nomoX=valoro … }}

La parametroj povas esti nomitaj aŭ nenomitaj kiel ĉe ŝablonoj.

Se nekonata signoĉeno venas de ekstere (kiel ŝablonaj parametroj), ĉiam estu laborata kun la formo 1=valoro.

Pliajn informojn vi trovos sur Helpo:Lua.