| Vorlagenprogrammierung | Diskussionen | Lua | Unterseiten | |||
| Modul | Deutsch | English | Modul: | Dokumentation | ||
Vorlage:URN – module to generate fully titled external links on resources in URN system by {{URN}}.
nbnnbn namespace.1 – suppress any fading out of error messages, e.g. in manual context; also do not generate maintenance categories#invoke for project specific adaption; all optional:
error (always provided)1 – hide error messages by defaultclass="error".2020-01-181 – Minimum version or wikidata or ~{{#invoke:Vorlage:URN|failsafe}} yields 2020-01-18{{#invoke:Vorlage:URN|failsafe|2001-01-01}} returns: »2020-01-18«{{#invoke:Vorlage:URN|failsafe|2099-01-01}} returns: »« – (empty), if minimal version condition not matchedwikidata, result is version ID registered on Wikidata (2020-01-18) or local if not found there.~, result is empty if local and Wikidata version are the same: ().~ and local version is synchronized.wikidata, or local if not found there, or not synchronized.Limited to:
The functions described above can be used by other modules, but are supposed for development and management purposes only. The URIutil library functions are a better solution for productive rendering.
local lucky, URNtemplate = pcall( require, "Module:Vorlage:URN" )
if type( URNtemplate ) ~= "table" then
-- In the event of errors, URNtemplate is an error message.
return "<span class=\"error\">" .. URNtemplate .. "</span>"
end
Subsequently there are available:
wikidata or ~ for synchronisationfalseFollow the steps:
Module:Vorlage:URN into your project.
Module:URIutil (d:Q19644443) is available for your project.
Module:TemplUtl (d:Q52364930) for improved error handling; see installation guide.There are built-in error messages, currently available in English and German.