Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Commons link/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getGallery}}</code> :Use wikidata to find Commons gallery corresponding to this article. If unable to find gallery in wikidata, default to searching for PAGENAME in Commons. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getGallery|title|linktext=text}}</code> :Link to Commons gallery at <code>title</code>. Optionally, use <code>text</code> as displayed link text. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getGallery|search=string|linktext=text}}</code> :Link to Commons search for <code>string</code>. Optionally, use <code>text</code> as displayed link text. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getCategory|fallback=string|linktext=text}}</code> :Use wikidata first, then if failure, use Commons search for <code>string</code>. Optionally, use <code>text</code> as displayed link text. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getCategory}}</code> :Use wikidata to find Commons category corresponding to this article. If unable to find category in wikidata, default to searching for Category:PAGENAME in Commons. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getCategory|title|linktext=text}}</code> :Link to Commons category at <code>Category:title</code>. Optionally, use <code>text</code> as displayed link text. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getCategory|search=string|linktext=text}}</code> :Link to Commons search for <code>Category:string</code>. Optionally, use <code>text</code> as displayed link text. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getCategory|fallback=string|linktext=text}}</code> :Use wikidata first, then if failure, use Commons search for <code>Category:string</code>. Optionally, use <code>text</code> as displayed link text. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getGalleryOrCategory}}</code> :Use wikidata to find "best" single Commons link: try gallery first, fall back to category. Other arguments as above. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getGalleryAndCategory}}</code> :Lua to implement {{tl|commons and category}}: return Commons gallery, Commons category, or both (if both found) <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|getGalleryAndCategory|GalleryName|CategoryName}}</code> :Either GalleryName or CategoryName or both can be supplied, will override wikidata search <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|bold=1|italic=1|nowrap=1|lcfirst=1}}</code> :Format of first link can be specified (any combination of bold, italic, nowrap, and lower-case first character) <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|linktext=link|categoryText=category}}</code> :Text in the first link, and the second (category) link can be overridden, also. <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|tracking=1}}</code> :Module can generate tracking categories for mismatch between supplied arguments and Wikidata. <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | [[Category:Wikidata modules]] }}</includeonly>
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)