Template:EntityID type
this template prints Item if the parameter is a valid Qid number, ie. a string beginning by a Q followed only by 0-9 digits, or 'Property' if the parameter is a valid Property id.
Otherwise it is substituted with the emptystring, hence it is false in a #if:
template statement.
Usage
edit{{EntityID type|Q1}}
Item
{{EntityID type|P1}}
Property
{{EntityID type|Q1}}
Item
{{EntityID type|1}}
{{EntityID type|bla}}
See also
editThe above documentation is transcluded from Template:EntityID type/doc (edit | history). Editors can experiment in this template's sandbox (create | mirror) and testcases (create) page. Please add categories to the /doc subpage. Subpages of this template. |