Template:Cclink

From blackwiki
Revision as of 06:33, 20 November 2016 by imported>Renamed user mou89p43twvqcvm8ut9w3 (Nominated for deletion; see Wikipedia:Templates for discussion/Log/2016 November 20#Template:Cclink. (TW))
Jump to navigation Jump to search

Template:Template for discussion/dated

50px Template documentation[view] [edit] [history] [purge]

This is a helper template that displays a linked commons category for use in infoboxes that fetch Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P373) from Wikidata.

Because we don't want to code a huge call to Wikidata twice, for the name of the link and the text to display, we can use this template to use the same text for both.

Usage

Typically inside an infobox definition, something like this:

| label25 = Commons category
|  data25 = {{{commons_category | {{#if:{{#property:P373}}| {{cclink | {{#invoke:WikidataIB |getValue |P373 |name=commons_category |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|}}}}} }} }}}}}