Content deleted Content added
→Call from within a module (_id): Add notes Tag: Disambiguation links added |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 52:
|-
|<syntaxhighlight lang="lua">local resolveEntityId = require( "Module:ResolveEntityId" )._id
id = resolveEntityId('
|style="vertical-align: mid;"|<code>id</code> = <code>{{#invoke:ResolveEntityId|entityid|
| "
|-
|<syntaxhighlight lang="lua">local resolveEntityId = require( "Module:ResolveEntityId" )._id
id = resolveEntityId('Wikipedia:Village pump (technical)/Archive 1')</syntaxhighlight>
|style="vertical-align: mid;"|<code>id</code> = <code>{{#invoke:ResolveEntityId|entityid|Wikipedia:Village pump (technical)/Archive 1|'''nil'''}}</code>
| "Wikipedia:Village pump (technical)/Archive 1" is not a valid Wikidata ID, and while [[Wikipedia:Village pump (technical)/Archive 1]] exists, it does not have a Wikidata ID, so <code>'''nil'''</code> is returned
|}
=== Use from within a template (entityid) ===
The following will return the entity id (or
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|entityid|''id''}}</code>
|