Difference between revisions of "Template:Commons and category-inline/doc"

From blackwiki
Jump to navigation Jump to search
imported>Edokter
(→‎Usage: update)
imported>Funandtrvl
(add)
Line 3: Line 3:
  
 
== Purpose ==
 
== Purpose ==
Sometimes articles have both Commons articles and categories about them. This template can be used to generate an inline link to a [[commons:Commons:Galleries|Commons gallery]] and a [[commons:Commons:Categories|Commons category]]. It is intended for use in the "[[Wikipedia:External links|External links]]" section of an article.
+
Sometimes articles have both Commons articles (galleries) and categories about them. This template can be used to generate an inline link to a [[commons:Commons:Galleries|Commons gallery]] and a [[commons:Commons:Categories|Commons category]]. It is intended for use in the "[[Wikipedia:External links|External links]]" section of an article.
  
 
== Usage ==
 
== Usage ==
This template takes one or two parameters; the Common gallery and the optional category (if the category name differs from the gallery name). There is also an optional parameter for {{para|extratext}}.
+
This template takes one or two parameters; the Commons gallery and the category (if the category name differs from PAGENAME). Please note that if the Commons gallery (1st parameter) or the Commons category (2nd parameter) is not the same as PAGENAME, then it must be specified and not left blank. There is also an optional parameter for {{para|extratext}}.
  
 
===Format===
 
===Format===
Line 12: Line 12:
  
 
===Example===
 
===Example===
*{{tlx|commons and category-inline|<var>Ursus maritimus</var>}}
+
*{{tlx|commons and category-inline|<var>Ursus maritimus</var>|<var>Ursus maritimus</var>}}
  
 
yields:  
 
yields:  
  
*{{commons and category-inline|Ursus maritimus}}
+
*{{commons and category-inline|Ursus maritimus|Ursus maritimus}}
  
 
== See also ==
 
== See also ==

Revision as of 19:54, 4 June 2013

Purpose

Sometimes articles have both Commons articles (galleries) and categories about them. This template can be used to generate an inline link to a Commons gallery and a Commons category. It is intended for use in the "External links" section of an article.

Usage

This template takes one or two parameters; the Commons gallery and the category (if the category name differs from PAGENAME). Please note that if the Commons gallery (1st parameter) or the Commons category (2nd parameter) is not the same as PAGENAME, then it must be specified and not left blank. There is also an optional parameter for |extratext=.

Format

{{commons and category-inline|CommonsArticleName|CommonsCategoryName}}

Example

yields:

  • 16x16px Media related to Lua error in Module:Commons_link at line 35: attempt to index field 'wikibase' (a nil value). at Wikimedia Commons

See also