Module:Commons link/doc
This is a documentation subpage for Module:Commons link. It may contain usage information, categories and other content that is not part of the original module page. |
මෙම Lua module පිටු 90,000 පමණ භාවිතා වන නිසා සිදුකරන වෙනස් කිරීම් බොහෝ ස්ථානවලට බලපානු ඇත. ඔබ සිදුකිරීමට අදහස් කරන වෙනස්කම් මෙම මොඩියුලයට අදාළ /sandbox හෝ /testcases උපපිටු. එම වෙනස්කම් සිදුකිරීමට ප්රථම අදාළ සාකච්ඡා පිටුවේ ඒ පිළිබඳව සංවාදයක් ගොඩනැගීමට කාරුණික වන්න.
Transclusion count updated automatically (ප්රලේඛනය වෙතට යොමුවන්න). |
මෙම මොඩියුලය මතු දැක්වෙන මොඩියුල මත යැපෙයි: |
For testing the sandbox, see Module:Commons link/sandbox/testcases.
Usage
සංස්කරණය{{#invoke:Commons link|getGallery}}
- Use wikidata to find Commons gallery corresponding to this article. If unable to find gallery in wikidata, default to searching for PAGENAME in Commons.
{{#invoke:Commons link|getGallery|title|linktext=text}}
- Link to Commons gallery at
title
. Optionally, usetext
as displayed link text.
{{#invoke:Commons link|getGallery|search=string|linktext=text}}
- Link to Commons search for
string
. Optionally, usetext
as displayed link text.
{{#invoke:Commons link|getCategory|fallback=string|linktext=text}}
- Use wikidata first, then if failure, use Commons search for
string
. Optionally, usetext
as displayed link text.
{{#invoke:Commons link|getCategory}}
- 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.
{{#invoke:Commons link|getCategory|title|linktext=text}}
- Link to Commons category at
Category:title
. Optionally, usetext
as displayed link text.
{{#invoke:Commons link|getCategory|search=string|linktext=text}}
- Link to Commons search for
Category:string
. Optionally, usetext
as displayed link text.
{{#invoke:Commons link|getCategory|fallback=string|linktext=text}}
- Use wikidata first, then if failure, use Commons search for
Category:string
. Optionally, usetext
as displayed link text.
{{#invoke:Commons link|getGalleryOrCategory}}
- Use wikidata to find "best" single Commons link: try gallery first, fall back to category. Other arguments as above.
{{#invoke:Commons link|getGalleryAndCategory}}
- Lua to implement {{commons and category}}: return Commons gallery, Commons category, or both (if both found)
{{#invoke:Commons link|getGalleryAndCategory|GalleryName|CategoryName}}
- Either GalleryName or CategoryName or both can be supplied, will override wikidata search
{{#invoke:Commons link|bold=1|italic=1|nowrap=1|lcfirst=1}}
- Format of first link can be specified (any combination of bold, italic, nowrap, and lower-case first character)
{{#invoke:Commons link|linktext=link|categoryText=category}}
- Text in the first link, and the second (category) link can be overridden, also.
{{#invoke:Commons link|tracking=1}}
- Module can generate tracking categories for mismatch between supplied arguments and Wikidata.