Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Documentation  



1.1  Usage  





1.2  Examples  



1.2.1  Normal  





1.2.2  Text override  





1.2.3  Full link override  





1.2.4  List format  









2 Improving the "no parameter" case  
1 comment  




3 | short =  
1 comment  













Template talk:Commons-inline




Page contents not supported in other languages.  









Template
Talk
 

















Read
Edit
Add topic
View history
 








Tools
   


Actions  



Read
Edit
Add topic
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Documentation[edit]

Usage[edit]

{{Commons-inline|Wikisource work}}

This template creates an inline link to the Wikicommons in list format.

Examples[edit]

Normal[edit]

{{Commons-inline|Work}}

Media related to Work at Wikimedia Commons

Text override[edit]

{{Commons-inline|Work|Puffle}}

Media related to Puffle at Wikimedia Commons

Full link override[edit]

{{Commons-inline|links=[[commons:Foo|]] and [[commons:Bar|]]}}

Media related to Foo and Bar at Wikimedia Commons

List format[edit]

{{Commons-inline|list=
** [[commons:Foo|]]
** [[commons:Bar|]]
}}

Related media at Wikimedia Commons:

Improving the "no parameter" case[edit]

Right now, when this template is called with no parameters, it defaults to using the title of the page as a search at Commons. The old behavior of search at Commons would take the reader directly to a gallery or category if the search string matched the name. However, in the last year or so, the search has become more conservative, and our readers are taken to a crowded and possibly confusing search results page.

Instead, I propose that we use Wikidata to restore the old behavior for no parameters, when possible. The code in the sandbox does this. When there are no parameters, it calls Module:Commons link to first look for a Commons gallery associated with the article. If no such gallery is found, it looks for Commons category associated with the article. If neither is found, then it defaults back to the current behavior of searching Commons with the article title.

A few things to note about Module:Commons link:

Note that this change only affects the "no parameter" case (see test cases). All other behaviors remain the same:

Any questions or comments before I turn this on? — hike395 (talk) 06:45, 16 March 2020 (UTC)[reply]

| short =[edit]

What's that? --Palosirkka (talk) 10:09, 21 June 2022 (UTC)[reply]


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template_talk:Commons-inline&oldid=1147619770"





This page was last edited on 1 April 2023, at 03:19 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki