Content deleted Content added
No edit summary |
No edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 146:
entry point when called from another module; example:
local rendered_identifier = require ('Module:
supported identifier templates are:
Line 177:
repeat -- loop until no
local params_t = params_get (args_t, i); -- get the parameters associated with enumerator <i>
params_t[template_name] = params_t[1] or params_t['id'];
params_t._template = nil; -- unset as no longer needed
if not params_t[template_name] then -- in case params_t[1] and params_t.id are nil
params_t[template_name] = ''; -- set <id> to empty string
return render_final ( -- make an error message and done
message_prefix,
substitute ('[[Template:$1|help]]', template_name),
no_cat and '' or substitute ('[[Category:Pages with $1 errors]]', template_name:upper())
}));
end
params_t[i] = nil; -- unset these as no longer needed
Line 189 ⟶ 194:
local Embargo = params_t['pmc-embargo-date']; -- {{pmc}} only
local Class = params_t['class']; -- {{arxiv}} only
local AsinTLD = params_t['asin-tld']; -- {{asin}} only
ID_list_t, ID_list_coins_t = identifiers.identifier_lists_get (params_t, {DoiBroken = DoiBroken, Embargo = Embargo, Class = Class, ASINTLD = AsinTLD}, {}); -- {} is a placeholder for unused ID_support{}
rendered_id = ID_list_t[1];
Line 238 ⟶ 244:
entry point from an invoke
{{#invoke:CS1 identifiers|main|_template=<identifier name>}}
]]
|